Skip to content

Commit

Permalink
Merge pull request #1307 from polywrap/origin-dev
Browse files Browse the repository at this point in the history
Prep 0.9.0
  • Loading branch information
dOrgJelli authored Oct 10, 2022
2 parents b95c714 + ae26b48 commit 1226e1d
Show file tree
Hide file tree
Showing 533 changed files with 8,828 additions and 9,006 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/rs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,42 @@ jobs:
run: yarn test:rust
working-directory: ./packages/js/client

Test-Cli:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --nonInteractive --frozen-lockfile --prefer-offline

- name: Build
run: yarn build

- name: Test
run: yarn test:rust
working-directory: ./packages/cli

# NOTE: Mac & Windows CI is not currently possible, since GitHub Actions does not
# use "Docker Enterprise". Docker Enterprise is required when running linux based
# containers, which is what we run within our toolchain for infra and build-images.
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# Polywrap Origin (0.9.0)
## Features
* [PR-1306](https://github.com/polywrap/toolchain/pull/1306) `polywrap` CLI: Console logging has been improved, and all commands now support `-q, --quiet` and `-v, --verbose` options.
* [PR-1204](https://github.com/polywrap/toolchain/pull/1204) `polywrap` CLI: **Build times are faster for wasm wrappers!!!** The `build` command has been updated to include the concept of "build strategies". The existing way of building (via `Dockerfile` image layers) is available through the `polywrap build --strategy image` command. Building without Docker (if all build-time dependencies are installed locally) can be performed using `--strategy local`. And lastly, the new default build strategy is `--strategy vm`, which runs all build steps in a pre-built base image, allowing for near-local speeds (once the image has been downloaded).
* NOTE: `--strategy image` is useful for source-code verification, something we'll be better supporting in the future.
* [PR-1297](https://github.com/polywrap/toolchain/pull/1297) `@polywrap/schema-bind`: `wasm/rust` now has support for `println!(...)` and `print!(...)` macros. They have been redefined to use the `polywrap_wasm_rs::wrap_debug_log(...)` function.
* [PR-1192](https://github.com/polywrap/toolchain/pull/1192) `@polywrap/client-js`: `PolywrapClient.invoke(...)` now supports invoke-time environment variables, passed in via the `env` property.
* [PR-1270](https://github.com/polywrap/toolchain/pull/1270) `polywrap` CLI: The `manifest` command has been added:
```
Usage: polywrap manifest|m [options] [command]
Inspect & Migrade Polywrap Manifests
Options:
-h, --help display help for command
Commands:
schema|s [options] [type] Prints out the schema for the current manifest format.
migrate|m [options] [type] Migrates the polywrap project manifest to the latest version.
help [command] display help for command
```
* [PR-1301](https://github.com/polywrap/toolchain/pull/1301) Added a `--format` option to the `migrate` command, enabling the targeting of specific format versions when migrating manifests (ex: `polywrap manifest migrate -f 0.2.0`).
* [PR-1218](https://github.com/polywrap/toolchain/pull/1218) `polywrap` CLI, `@polywrap/tracing-js`: The `tracing` infrastructure module (i.e. `polywrap infra up --modules tracing`) now uses version `0.11.0` of the `SizNoz` tracing service. Additionally the underlying `@polywrap/tracing-js` library has been updated to support this, and also now has named traces via the `traceName` configuration property.

## Bugs
* [PR-1304](https://github.com/polywrap/toolchain/pull/1304) `polywrap` CLI: Generated build files from the `vm` strategy now have proper file-system permissions.
* [PR-1305](https://github.com/polywrap/toolchain/pull/1305) `@polywrap/ipfs-plugin-js`: Fallback providers are now properly being used.
* [PR-1296](https://github.com/polywrap/toolchain/pull/1296) `polywrap` CLI: The `polywrap.app.yaml` and `polywrap.plugin.yaml` project manifest file names are being deprecated in favor of a unified `polywrap.yaml` file for all types of projects (wasm, interface, plugin, app). They will still silently work now, but in the future will no longer be recognized defaults.
* [PR-1303](https://github.com/polywrap/toolchain/pull/1303) `@polywrap/core-js`: The `Uri` class now properly formats itself when being `JSON.stringify(...)`'d.
* [PR-1288](https://github.com/polywrap/toolchain/pull/1288) `@polywrap/core-js`: Correctly handle errors in the `getImplementations` algorithm.
* [PR-1298](https://github.com/polywrap/toolchain/pull/1298) `@polywrap/ipfs-plugin-js`, `@polywrap/ipfs-resolver-plugin-js`: Remove the use of `require(...)` statements.
* [PR-1286](https://github.com/polywrap/toolchain/pull/1286) `@polywrap/polywrap-manifest-types-js`: Manifest migration logic has been upgraded to use a strategy that finds a "shortest path" between the `from` and `to` format versions, using predefined migration functions.

## Breaking Changes
* [PR-1284](https://github.com/polywrap/toolchain/pull/1284) `@polywrap/core-js`: `Wrapper.getFile(...)` and `Wrapper.getManifest(...)` no longer require a `Client` instance as a second function argument.
* [PR-1291](https://github.com/polywrap/toolchain/pull/1291) `@polywrap/core-js`, `@polywrap/client-js`: All `ClientConfig` properties are now `readonly`.
* [PR-1287](https://github.com/polywrap/toolchain/pull/1287) `@polywrap/core-js`: `executeMaybeAsyncFunction` has been removed.
* [PR-1277](https://github.com/polywrap/toolchain/pull/1277) `@polywrap/client-js`: The following methods now return the `Result<T, E>` type, and will not throw exceptions: `getManifest(...)`, `getFile(...)`, `getImplementations(...)`, `query(...)`, `invokeWrapper(...)`, `invoke(...)`, `loadWrapper(...)`.
* [PR-1192](https://github.com/polywrap/toolchain/pull/1192) `@polywrap/client-js`: `PolywrapClient.invoke(...)` no longer accepts invoke-time reconfiguration via the `config` property. Users who wish to reconfigure the client can do so by calling `client.getConfig()`, modifying it via the `ClientConfigBuilder`, and constructing a new `PolywrapClient` instance.

# Polywrap Origin (0.8.0)
## Features
* [PR-1083](https://github.com/polywrap/toolchain/pull/1083) `@polywrap/client-config-builder-js`: The default client config now has the ability to resolve `http` URIs (ex: `wrap://http/domain.com/path`) via the `@polywrap/http-resolver-plugin-js`.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
0.9.0
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
"link:manifests": "yarn link:manifests:polywrap && yarn link:manifests:wrap",
"link:manifests:polywrap": "cd packages/js/manifests/polywrap && (yarn unlink || true) && yarn link && cd ../../../../dependencies && yarn link @polywrap/polywrap-manifest-types-js && cd ../",
"link:manifests:wrap": "cd packages/js/manifests/wrap && (yarn unlink || true) && yarn link && cd ../../../../dependencies && yarn link @polywrap/wrap-manifest-types-js && cd ../",
"link:schema": "yarn link:schema:parse && yarn link:schema:compose",
"link:schema": "yarn link:schema:parse && yarn link:schema:compose && yarn link:schema:bind",
"link:schema:parse": "cd packages/schema/parse && (yarn unlink || true) && yarn link && cd ../../../dependencies && yarn link @polywrap/schema-parse && cd ../",
"link:schema:compose": "cd packages/schema/compose && (yarn unlink || true) && yarn link && cd ../../../dependencies && yarn link @polywrap/schema-compose && cd ../",
"link:schema:bind": "cd packages/schema/bind && (yarn unlink || true) && yarn link && cd ../../../dependencies && yarn link @polywrap/schema-bind && cd ../",
"lint": "lerna run lint",
"lint:fix": "lerna run lint -- --fix",
"lint:ci": "yarn lint",
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = {
},
},
modulePathIgnorePatterns: [
"<rootDir>/src/__tests__/project/.polywrap"
"<rootDir>/src/__tests__/project/.polywrap",
"<rootDir>/src/__tests__/e2e/build-rs.spec.ts"
],
testPathIgnorePatterns: [
"<rootDir>/src/__tests__/project/.polywrap"
Expand Down
19 changes: 19 additions & 0 deletions packages/cli/jest.rs.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
collectCoverage: true,
preset: "ts-jest",
testEnvironment: "node",
globals: {
"ts-jest": {
diagnostics: false
},
},
testPathIgnorePatterns: [
"<rootDir>/src/__tests__/project/.polywrap"
],
transformIgnorePatterns: [
"<rootDir>/src/__tests__/project/.polywrap"
],
setupFilesAfterEnv: ["./jest.setup.js"],
testMatch: ["**/build-rs.spec.ts"],
modulePathIgnorePatterns: [],
};
52 changes: 38 additions & 14 deletions packages/cli/lang/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"commands_common_options_configPath": "config-path",
"commands_common_options_config": "Add custom configuration to the PolywrapClient",
"commands_common_options_verbose": "Verbose output (default: false)",
"commands_common_options_quiet": "Suppress output (default: false)",
"commands_build_description": "Build Polywrap Projects (type: interface, wasm)",
"commands_build_error_manifestPathMissing": "{option} option missing {argument} argument",
"commands_build_error_manifestNotFound": "Manifest not found. Search paths used: {paths}",
Expand All @@ -15,19 +17,18 @@
"commands_build_options_t": "Use the development server's ENS instance",
"commands_build_options_n": "Skip code generation",
"commands_build_options_w": "Automatically rebuild when changes are made (default: false)",
"commands_build_options_v": "Verbose output (default: false)",
"commands_build_options_s": "Strategy to use for building the wrapper",
"commands_build_options_s_strategy": "strategy",
"commands_infra_description": "Modular Infrastructure-As-Code Orchestrator",
"commands_infra_actions_subtitle": "Infra allows you to execute the following commands:",
"commands_infra_options_options": "options",
"commands_infra_options_manifest": "manifest",
"commands_infra_options_i_node": "node",
"commands_infra_options_h": "Show usage information",
"commands_infra_options_m": "Use only specified modules",
"commands_infra_options_v": "Verbose output (default: false)",
"commands_infra_options_o": "Use only specified modules",
"commands_infra_options_o_module": "module",
"commands_infra_options_d": "Run in detached mode",
"commands_infra_moduleName": "module-name",
"commands_infra_manifestPath": "manifest-path",
"commands_infra_manifestPathDescription": "Infra Manifest path",
"commands_infra_options_m_path": "path",
"commands_infra_options_m": "Path to the Polywrap Infra manifest file (default: {default})",
"commands_infra_command_up": "Start Polywrap infrastructure",
"commands_infra_command_down": "Stop Polywrap infrastructure",
"commands_infra_command_vars": "Show Polywrap infrastructure's required .env variables",
Expand Down Expand Up @@ -64,7 +65,6 @@
"commands_deploy_options_o": "Output file path for the deploy result",
"commands_deploy_options_n": "Name of the deployment to execute",
"commands_deploy_options_c": "Argument for deployment's publish step, in case deploy step is absent",
"commands_deploy_options_v": "Verbose output (default: false)",
"commands_deploy_options_p": "Path to the build directory",
"commands_deploy_error_manifestPathMissing": "{option} option missing {argument} argument",
"commands_deploy_error_pathMissing": "{option} option missing {argument} argument",
Expand Down Expand Up @@ -94,6 +94,7 @@
"commands_docgen_options_markdown": "Generate {framework} markdown",
"commands_docgen_options_i": "Also generate docs for dependencies",
"commands_docgen_error_manifestNotFound": "Manifest not found. Search paths used: {paths}",
"commands_docgen_error_projectLoadFailed": "Could not load project form the given manifest. Manifest: `{manifestFile}`",
"commands_create_description": "Create New Projects",
"commands_create_directoryExists": "Directory with name {dir} already exists",
"commands_create_error_commandFail": "Command failed: {error}",
Expand Down Expand Up @@ -126,11 +127,10 @@
"commands_run_options_validateScript": "Validate the output of the workflow jobs",
"commands_run_options_validate": "cue-file",
"commands_run_options_outputFile": "Output file path for the workflow result",
"commands_run_options_manifest": "manifest",
"commands_run_options_quiet": "Suppress output",
"commands_run_options_m_path": "path",
"commands_run_options_m": "Path to the Polywrap Workflow manifest file (default: {default})",
"commands_run_options_jobIds": "jobs",
"commands_run_options_jobs": "Specify ids of jobs that you want to run",
"commands_run_manifestPathDescription": "Workflow Manifest path",
"commands_run_error_validatorNotFound": "validate script not found at: {path}",
"commands_run_error_outputFileMissing": "{option} option missing {argument} argument",
"commands_run_error_clientConfigMissingPath": "{option} option missing {argument} argument",
Expand Down Expand Up @@ -162,12 +162,27 @@
"commands_run_error_missingScript": "Required argument {script} is missing",
"commands_run_error_noApi": "API needs to be initialized",
"commands_run_error_readFail": "Failed to read query {query}",
"commands_run_error_unsupportedOutputFileExt": "Unsupported outputFile extention: ${outputFileExt}",
"commands_run_error_unsupportedOutputFileExt": "Unsupported outputFile extention: {outputFileExt}",
"commands_run_error_cueDoesNotExist": "Require cue to run validator, checkout https://cuelang.org/ for more information",
"commands_run_error_noWorkflowScriptFound": "Workflow script not found at path: {path}",
"commands_run_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'",
"commands_polywrap_error_notACommand": "is not a command",
"commands_polywrap_helpPrompt": "Type {command} to view common commands",
"commands_manifest_description": "Inspect & Migrade Polywrap Manifests",
"commands_manifest_options_m": "Path to the manifest file (default: {default})",
"commands_manifest_options_f": "Target format to migrate to (defaults to latest)",
"commands_manifest_options_t": "Type of manifest file to migrate (default: {default})",
"commands_manifest_options_m_path": "path",
"commands_manifest_options_m_format": "format",
"commands_manifest_options_t_type": "type",
"commands_manifest_command_s": "Prints out the schema for the current manifest format.",
"commands_manifest_command_m": "Migrates the polywrap project manifest to the latest version.",
"commands_manifest_command_s_option_r": "Output raw JSON Schema",
"commands_manifest_command_m_preserveManifestMessage": "Saved previous version of manifest to {preservedFilePath}",
"commands_manifest_command_m_migrateManifestMessage": "Migrating {manifestFile} to version {version}",
"commands_manifest_formatError": "Unsupported manifest format. Please make sure that you have the 'format' field present in {fileName} with one of the following values: {values}",
"commands_manifest_migrate_targetFormatError": "Unsupported target format. Supported formats: {formats}",
"commands_manifest_projectTypeError": "Unsupported project type.",
"lib_codeGenerator_genCodeError": "Failed to generate types",
"lib_codeGenerator_genCodeText": "Generate types",
"lib_codeGenerator_genCodeWarning": "Warnings while generating types",
Expand All @@ -188,7 +203,6 @@
"lib_compiler_compileWasmModulesWarning": "Warnings while compiling Wasm modules",
"lib_compiler_failedAbiReturn": "Abi composer failed to return a combined abi.",
"lib_compiler_noModulesToBuild": "No modules to build declared.",
"lib_compiler_missingAbi": "Missing ABI definition",
"lib_compiler_missingModule": "Missing module definition",
"lib_compiler_noInterfaceModule": "Interfaces cannot have implementation file",
"lib_compiler_step": "Compiling WASM module",
Expand Down Expand Up @@ -216,13 +230,22 @@
"lib_helpers_manifest_outputWarning": "Warnings writing manifest to {path}",
"lib_helpers_manifest_unableToDump": "Unable to dump manifest: {manifest}",
"lib_helpers_manifest_unableToLoad": "Unable to load manifest: {path}",
"lib_helpers_copyText": "Artifacts written to {path}",
"lib_helpers_copyError": "Failed to write build artifacts to {path}",
"lib_helpers_copyWarning": "Warnings write build artifacts to {path}",
"lib_helpers_docker_copyText": "Artifacts written to {path} from the image `{image}`",
"lib_helpers_docker_couldNotConnect": "Could not connect to the Docker daemon. Is the docker daemon running?",
"lib_helpers_docker_copyError": "Failed to write build artifacts to {path} from the image `{image}`",
"lib_helpers_docker_copyWarning": "Warnings write build artifacts to {path} from the image `{image}`",
"lib_helpers_docker_buildText": "Building source image `{image}` using dockerfile `{dockerfile}` in context `{context}`",
"lib_helpers_docker_buildError": "Error while building source image `{image}` using dockerfile `{dockerfile}` in context `{context}`",
"lib_helpers_docker_buildWarning": "Warnings while building image `{image}` using dockerfile `{dockerfile}` in context `{context}`",
"lib_helpers_docker_buildVMText": "Building sources in Docker container`",
"lib_helpers_docker_buildVMError": "Error while building sources in Docker container",
"lib_helpers_docker_buildVMWarning": "Warnings while building sources in Docker container",
"lib_helpers_buildText": "Building sources",
"lib_helpers_buildError": "Error while building sources",
"lib_helpers_buildWarning": "Warnings while building sources",
"lib_helpers_docker_projectFolderMissing": "Build image `{image}` missing /project folder",
"lib_helpers_docker_projectBuildFolderMissing": "Build image `{image}` missing build artifact `{artifact}` in folder /project/build",
"lib_helpers_parameters_unexpectedValue": "Unexpected value provided for one or more of {options}. See --help for more information.",
Expand All @@ -246,5 +269,6 @@
"lib_wrap_abi_not_found": "No WRAP ABI found",
"lib_helpers_wrap_manifest_outputText": "WRAP manifest written in {path}",
"lib_helpers_wrap_manifest_outputError": "Error writing WRAP manifest in {path}",
"lib_helpers_wrap_manifest_outputWarning": "Warning writing WRAP manifest in {path}"
"lib_helpers_wrap_manifest_outputWarning": "Warning writing WRAP manifest in {path}",
"lib_option_defaults_deprecated_project_manifest": "WARNING: the filename `{fileName}` is deprecated and will be removed from the default project manifest files in the future. Please rename it to `polywrap.yaml`."
}
Loading

0 comments on commit 1226e1d

Please sign in to comment.