diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3083b2a..667d8ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,4 +20,4 @@ jobs: ${{ runner.os }}-node- - run: npm ci - name: build - run: npm exec webpack && npm exec js-compute-runtime ./bin/index.js ./bin/main.wasm + run: npm run build diff --git a/fastly.toml b/fastly.toml index 52bf36e..abd9757 100644 --- a/fastly.toml +++ b/fastly.toml @@ -6,7 +6,6 @@ description = "Application template for validating requests against an OpenAPI d language = "javascript" manifest_version = 2 name = "OpenAPI Validation (JS)" -service_id = "" [local_server] [local_server.backends] @@ -14,7 +13,7 @@ service_id = "" url = "https://httpbin.org/" [scripts] - build = "npm exec webpack && npm exec js-compute-runtime ./bin/index.js ./bin/main.wasm" + build = "npm run build" [setup] [setup.backends] diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 8689bea..895521e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -9,7 +9,7 @@ "version": "0.5.0", "license": "MIT", "dependencies": { - "@fastly/js-compute": "^1.3.0", + "@fastly/js-compute": "^1.3.2", "buffer": "^6.0.3", "g": "^2.0.1", "https-browserify": "^1.0.0", @@ -47,13 +47,13 @@ } }, "node_modules/@fastly/js-compute": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@fastly/js-compute/-/js-compute-1.3.0.tgz", - "integrity": "sha512-+XZfEApQsv0FnuEprx+hv+l3+9+b5bPhnqbtipbuw9U/bDSPB7GGsdV3/YBH6biV9z5oAxvcpZQyckgyaLlnfw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@fastly/js-compute/-/js-compute-1.3.2.tgz", + "integrity": "sha512-SvWaa2Qf05AKeNejW55/5T3ROd+mO7mRQh/wBNH29OyqJOi4lrC9D3uCWJMjdyyi4jxrL6ux8vWGJglFCBRoyQ==", "dependencies": { "@jakechampion/wizer": "^1.6.0", "esbuild": "^0.15.16", - "js-component-tools": "^0.2.2", + "js-component-tools": "0.2.2", "tree-sitter": "^0.20.1", "tree-sitter-javascript": "^0.19.0" }, @@ -82,6 +82,21 @@ "@jakechampion/wizer-win32-x64": "1.6.0" } }, + "node_modules/@jakechampion/wizer-darwin-arm64": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jakechampion/wizer-darwin-arm64/-/wizer-darwin-arm64-1.6.0.tgz", + "integrity": "sha512-bQdIPdR+Ye0GiNdirVhx0kx14oY2uzwXfh/2dDgteBdcb7mDubzKbdt3ROMyV1UFRVhOtqbthZNk7qLBB6Occg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "bin": { + "wizer-darwin-arm64": "wizer" + } + }, "node_modules/@jakechampion/wizer-darwin-x64": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@jakechampion/wizer-darwin-x64/-/wizer-darwin-x64-1.6.0.tgz", @@ -112,6 +127,21 @@ "wizer-linux-x64": "wizer" } }, + "node_modules/@jakechampion/wizer-win32-x64": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jakechampion/wizer-win32-x64/-/wizer-win32-x64-1.6.0.tgz", + "integrity": "sha512-9xzpraJIhLdOnXTC1DjxjyfV52BBlAZTTAlpnE04GxVRvRGZ6wPi/RdACkg3inAfeTP7A/bTq3BJLql/Hansdw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "bin": { + "wizer-win32-x64": "wizer" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -1254,9 +1284,9 @@ } }, "node_modules/js-component-tools": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/js-component-tools/-/js-component-tools-0.2.3.tgz", - "integrity": "sha512-hktKSgBaEk/Ttpl3ejBseeQn4K41wJijEA8YgxGXhyfCf5zT7YdEq1LYn+IYCPENEVgdcPK1c2ntbPKVjWeNJg==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/js-component-tools/-/js-component-tools-0.2.2.tgz", + "integrity": "sha512-+DorgW2JyOf3Qja35wtw0VQYkcdo4tkInapJ4xlPJXXW49RhEdNMzX/PoHKC5nS7AhV1VBweA1gmYOIYUOXDLw==", "bin": { "jsct": "cli.mjs" } @@ -2366,13 +2396,13 @@ "dev": true }, "@fastly/js-compute": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@fastly/js-compute/-/js-compute-1.3.0.tgz", - "integrity": "sha512-+XZfEApQsv0FnuEprx+hv+l3+9+b5bPhnqbtipbuw9U/bDSPB7GGsdV3/YBH6biV9z5oAxvcpZQyckgyaLlnfw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@fastly/js-compute/-/js-compute-1.3.2.tgz", + "integrity": "sha512-SvWaa2Qf05AKeNejW55/5T3ROd+mO7mRQh/wBNH29OyqJOi4lrC9D3uCWJMjdyyi4jxrL6ux8vWGJglFCBRoyQ==", "requires": { "@jakechampion/wizer": "^1.6.0", "esbuild": "^0.15.16", - "js-component-tools": "^0.2.2", + "js-component-tools": "0.2.2", "tree-sitter": "^0.20.1", "tree-sitter-javascript": "^0.19.0" } @@ -2388,6 +2418,12 @@ "@jakechampion/wizer-win32-x64": "1.6.0" } }, + "@jakechampion/wizer-darwin-arm64": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jakechampion/wizer-darwin-arm64/-/wizer-darwin-arm64-1.6.0.tgz", + "integrity": "sha512-bQdIPdR+Ye0GiNdirVhx0kx14oY2uzwXfh/2dDgteBdcb7mDubzKbdt3ROMyV1UFRVhOtqbthZNk7qLBB6Occg==", + "optional": true + }, "@jakechampion/wizer-darwin-x64": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@jakechampion/wizer-darwin-x64/-/wizer-darwin-x64-1.6.0.tgz", @@ -2400,6 +2436,12 @@ "integrity": "sha512-nOH/wwoN/jaLYBKyCnEQJtqEOrSuXMOWIdnh/vAp5w4sFXuyelyZY0k6g9b8puzLOyXJTrUoYfhHyf2vdLGlxQ==", "optional": true }, + "@jakechampion/wizer-win32-x64": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jakechampion/wizer-win32-x64/-/wizer-win32-x64-1.6.0.tgz", + "integrity": "sha512-9xzpraJIhLdOnXTC1DjxjyfV52BBlAZTTAlpnE04GxVRvRGZ6wPi/RdACkg3inAfeTP7A/bTq3BJLql/Hansdw==", + "optional": true + }, "@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -3278,9 +3320,9 @@ } }, "js-component-tools": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/js-component-tools/-/js-component-tools-0.2.3.tgz", - "integrity": "sha512-hktKSgBaEk/Ttpl3ejBseeQn4K41wJijEA8YgxGXhyfCf5zT7YdEq1LYn+IYCPENEVgdcPK1c2ntbPKVjWeNJg==" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/js-component-tools/-/js-component-tools-0.2.2.tgz", + "integrity": "sha512-+DorgW2JyOf3Qja35wtw0VQYkcdo4tkInapJ4xlPJXXW49RhEdNMzX/PoHKC5nS7AhV1VBweA1gmYOIYUOXDLw==" }, "js-yaml": { "version": "4.1.0", diff --git a/package.json b/package.json index f2482df..f09e8f7 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,17 @@ "webpack-cli": "^5.0.1" }, "dependencies": { - "@fastly/js-compute": "^1.3.0", + "@fastly/js-compute": "^1.3.2", "buffer": "^6.0.3", "g": "^2.0.1", "https-browserify": "^1.0.0", "openapi-backend": "^5.6.2", "process": "^0.11.10", "stream-http": "^3.2.0" + }, + "scripts": { + "prebuild": "webpack", + "build": "js-compute-runtime bin/index.js bin/main.wasm", + "deploy": "npm run build && fastly compute deploy" } }