Skip to content

Commit effc21c

Browse files
authored
Merge pull request #1019 from polywrap/prealpha-dev
Prep 0.0.1-prealpha.93
2 parents 23b252c + 69d1c93 commit effc21c

353 files changed

Lines changed: 3266 additions & 4261 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ packages/manifest-schemas/ @dOrgJelli
1616
packages/js/cli @dOrgJelli @krisbitney @namesty @nerfZael @Niraj-Kamdar
1717

1818
# Client Interfaces
19-
packages/core-interfaces @dOrgJelli
19+
packages/interfaces @dOrgJelli
2020

2121
# JS Client
2222
packages/js/client @dOrgJelli @krisbitney @namesty @nerfZael

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Polywrap 0.0.1-prealpha.93
2+
## Breaking Changes
3+
* [PR-986](https://github.com/polywrap/monorepo/pull/986) WRAP build artifacts have been refined:
4+
* Wasm module name changed from `module.wasm` to `wrap.wasm`
5+
* Polywrap manifests are no longer written to build folder (except for project metadata).
6+
* The `wrap.info` is now the primary manifest file describing the wrapper:
7+
* `{ version, type, name, abi }`
8+
* [source](https://github.com/polywrap/monorepo/blob/7fd5b2faad2cb664044edde133d8e068d685d97a/packages/js/manifests/wrap/src/formats/wrap.info/0.0.1.ts)
9+
* encoded as msgpack binary file
10+
* `schema.graphql` remains but will be deprecated for `wrap.info`'s built-in `abi`.
11+
112
# Polywrap 0.0.1-prealpha.92
213
## Features
314
* [PR-1006](https://github.com/polywrap/monorepo/pull/1006/files) `polywrap-wasm-rs`: Add Rust encoder unit tests.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.1-prealpha.92
1+
0.0.1-prealpha.93

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"workspaces": {
1111
"packages": [
1212
"./packages/cli",
13-
"./packages/core-interfaces/**",
13+
"./packages/interfaces/**",
1414
"./packages/js/**",
15-
"./packages/manifest-schemas/**",
15+
"./packages/manifests/**",
1616
"./packages/schema/**",
1717
"./packages/templates/**",
1818
"./packages/test-cases",

packages/cli/lang/en.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,5 +270,9 @@
270270
"lib_wasm_rust_invalidModule": "Module paths must point to Cargo.toml files. Found: {path}",
271271
"lib_docker_invalidImageId": "Invalid docker image ID returned: {imageId}",
272272
"lib_docker_noInstall": "Docker executable not found in PATH",
273-
"lib_infra_unrecognizedModule": "Unrecognized modules: {modules}. Default modules: {defaultModules}"
273+
"lib_infra_unrecognizedModule": "Unrecognized modules: {modules}. Default modules: {defaultModules}",
274+
"lib_wrap_abi_not_found": "No WRAP ABI found",
275+
"lib_helpers_wrap_manifest_outputText": "WRAP manifest written in {path}",
276+
"lib_helpers_wrap_manifest_outputError": "Error writing WRAP manifest in {path}",
277+
"lib_helpers_wrap_manifest_outputWarning": "Warning writing WRAP manifest in {path}"
274278
}

packages/cli/lang/es.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,5 +270,9 @@
270270
"lib_wasm_rust_invalidModule": "Module paths must point to Cargo.toml files. Found: {path}",
271271
"lib_docker_invalidImageId": "Invalid docker image ID returned: {imageId}",
272272
"lib_docker_noInstall": "Docker executable not found in PATH",
273-
"lib_infra_unrecognizedModule": "Unrecognized modules: {modules}. Default modules: {defaultModules}"
273+
"lib_infra_unrecognizedModule": "Unrecognized modules: {modules}. Default modules: {defaultModules}",
274+
"lib_wrap_abi_not_found": "No WRAP ABI found",
275+
"lib_helpers_wrap_manifest_outputText": "WRAP manifest written in {path}",
276+
"lib_helpers_wrap_manifest_outputError": "Error writing WRAP manifest in {path}",
277+
"lib_helpers_wrap_manifest_outputWarning": "Warning writing WRAP manifest in {path}"
274278
}

packages/cli/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"build": "rimraf ./build && tsc --project tsconfig.build.json && yarn build:build-images && yarn build:deploy-modules && yarn build:infra-modules",
2020
"build:build-images": "copyfiles ./src/lib/defaults/build-images/**/**/* ./build/lib/defaults/build-images/ -u 4",
2121
"build:deploy-modules": "copyfiles ./src/lib/defaults/deploy-modules/**/polywrap.deploy.ext.json ./build/lib/defaults/deploy-modules -u 4",
22-
"build:infra-modules": "ts-node ./copyfiles ./src/lib/defaults/infra-modules ./build/lib/defaults/infra-modules",
22+
"build:infra-modules": "ts-node ./scripts/copyfiles ./src/lib/defaults/infra-modules ./build/lib/defaults/infra-modules",
2323
"prebuild": "ts-node ./scripts/generateIntlTypes.ts",
2424
"build:fast": "rimraf ./build && tsc --project tsconfig.build.json",
2525
"lint": "eslint --color -c ../../.eslintrc.js .",
@@ -40,11 +40,14 @@
4040
"@polywrap/ens-resolver-plugin-js": "0.0.1-prealpha.92",
4141
"@polywrap/ethereum-plugin-js": "0.0.1-prealpha.92",
4242
"@polywrap/ipfs-plugin-js": "0.0.1-prealpha.92",
43+
"@polywrap/msgpack-js": "0.0.1-prealpha.92",
4344
"@polywrap/os-js": "0.0.1-prealpha.92",
45+
"@polywrap/polywrap-manifest-types-js": "0.0.1-prealpha.92",
4446
"@polywrap/schema-bind": "0.0.1-prealpha.92",
4547
"@polywrap/schema-compose": "0.0.1-prealpha.92",
4648
"@polywrap/schema-parse": "0.0.1-prealpha.92",
4749
"@polywrap/test-env-js": "0.0.1-prealpha.92",
50+
"@polywrap/wrap-manifest-types-js": "0.0.1-prealpha.92",
4851
"assemblyscript": "0.19.1",
4952
"axios": "0.21.2",
5053
"chalk": "4.1.0",
@@ -78,6 +81,7 @@
7881
"dir-compare": "3.3.0",
7982
"eslint-plugin-formatjs": "2.12.7",
8083
"jest": "26.6.3",
84+
"json-schema-to-typescript": "10.1.3",
8185
"ts-jest": "26.5.4",
8286
"ts-morph": "10.0.1",
8387
"ts-node": "8.10.2"
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import fse from "fs-extra";
2+
import path from "path";
23

3-
const source = process.argv[2];
4-
const dest = process.argv[3];
4+
const source = path.join(process.cwd(), process.argv[2]);
5+
const dest = path.join(process.cwd(), process.argv[3]);
56

67
const ignore = [
78
".env",

packages/cli/src/__tests__/e2e/build.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ describe("e2e tests for build command", () => {
180180
expect(error).toBe("");
181181
expect(code).toEqual(0);
182182
expect(output).toContain(`Artifacts written to ${buildDir}`);
183-
expect(output).toContain(`Manifest written to ${buildDir}/polywrap.json`);
183+
expect(output).toContain(`WRAP manifest written in ${buildDir}/wrap.info`);
184184

185185
testBuildOutput(testCaseDir, outputDir);
186186
});

packages/cli/src/commands/deploy.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/* eslint-disable prefer-const */
2+
import { Command, Program } from "./types";
23
import {
3-
intlMsg,
4-
PolywrapProject,
54
defaultPolywrapManifest,
5+
DeployerHandler,
66
DeployPackage,
7+
intlMsg,
78
parseWasmManifestFileOption,
9+
PolywrapProject,
810
} from "../lib";
9-
import { DeployerHandler } from "../lib/deploy/deployer";
10-
import { Command, Program } from "./types";
1111

12+
import { DeployManifest } from "@polywrap/polywrap-manifest-types-js";
1213
import fs from "fs";
1314
import nodePath from "path";
1415
import { print } from "gluegun";
15-
import { Uri, DeployManifest } from "@polywrap/core-js";
16+
import { Uri } from "@polywrap/core-js";
1617
import { validate } from "jsonschema";
1718

1819
const defaultManifestStr = defaultPolywrapManifest.join(" | ");
@@ -54,7 +55,7 @@ async function run(options: DeployCommandOptions): Promise<void> {
5455
const project = new PolywrapProject({
5556
rootDir: nodePath.dirname(manifestFile),
5657
polywrapManifestPath: manifestFile,
57-
quiet: verbose ? false : true,
58+
quiet: !verbose,
5859
});
5960
await project.validate();
6061

@@ -91,14 +92,12 @@ async function run(options: DeployCommandOptions): Promise<void> {
9192
// Create all handlers
9293
Object.entries(deployManifest.stages).forEach(([stageName, stageValue]) => {
9394
const publisher = stageToPackageMap[stageName].deployer;
94-
const handler = new DeployerHandler(
95+
handlers[stageName] = new DeployerHandler(
9596
stageName,
9697
publisher,
9798
stageValue.config,
9899
print
99100
);
100-
101-
handlers[stageName] = handler;
102101
});
103102

104103
// Establish dependency chains

0 commit comments

Comments
 (0)