From 349f4b33e3b6b6d239406272b63bca8e3eee117a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Negr=C3=B3n?= Date: Wed, 4 Dec 2024 13:58:14 -0400 Subject: [PATCH] chore(all): [v16] Bump eslint and related packages, bump prettier and run on codebase (#927) * bumping oclif packages * bump more packages * upgrade Yeoman enviornment to latest v3 * dotenv added a package.json * more package upgrades * use promises instead of callback * revert jsonschema upgrade as it breaks a test * bump * upgrade Lerna to v8 * upgrade prettier to latest v3 * run prettier with trailingComma: es5 * upgrade husky * husky followups * Revert "upgrade prettier to latest v3" This reverts commit 840d0ae321ac6c5e12878acf5a38d1f023713018. * Revert "run prettier with trailingComma: es5" This reverts commit df8a16f5c4348a3be5d4ffeb2feb1a9822fa8ec9. * bump mocha, dotenv and oclif core patch * undo convert changes * bump eslint and related packages * prettier bump, run prettier * fix eslintignore * fix test * run over example-apps as well * rebuild yarn.lock --- .eslintignore | 4 - .eslintrc | 34 - eslint.config.cjs | 64 + example-apps/babel/src/index.js | 4 +- example-apps/basic-auth/authentication.js | 2 +- .../basic-auth/test/authentication.test.js | 4 +- example-apps/callback/test/creates.test.js | 4 +- example-apps/create/index.js | 4 +- example-apps/create/test/creates.js | 8 +- example-apps/custom-auth/authentication.js | 2 +- example-apps/digest-auth/authentication.js | 2 +- .../digest-auth/test/authentication.test.js | 2 +- .../dynamic-dropdown/test/triggers.test.js | 4 +- example-apps/files/test/creates.test.js | 6 +- example-apps/files/test/hydrators.test.js | 2 +- example-apps/files/test/triggers.test.js | 2 +- example-apps/github/samples/sample_issue.js | 22 +- .../github/samples/sample_repo_list.js | 8 +- .../github/test/authentication.test.js | 8 +- example-apps/middleware/test/triggers.js | 8 +- .../oauth1-trello/test/authentication.test.js | 8 +- example-apps/oauth1-tumblr/authentication.js | 22 +- example-apps/oauth1-tumblr/index.js | 4 +- example-apps/oauth1-tumblr/test/index.js | 2 +- example-apps/oauth1-twitter/index.js | 4 +- example-apps/oauth1-twitter/triggers/like.js | 29 +- .../oauth2/test/authentication.test.js | 10 +- example-apps/onedrive/.eslintrc.json | 21 +- example-apps/onedrive/authentication.js | 60 +- example-apps/onedrive/before-handlers.js | 2 +- example-apps/onedrive/constants.js | 12 +- example-apps/onedrive/creates/text-file.js | 28 +- example-apps/onedrive/hydrators.js | 34 +- example-apps/onedrive/index.js | 22 +- example-apps/onedrive/resources/base-item.js | 80 +- example-apps/onedrive/resources/file.js | 34 +- example-apps/onedrive/resources/folder.js | 42 +- example-apps/onedrive/test/authentication.js | 64 +- .../onedrive/test/creates/text-file.js | 122 +- example-apps/onedrive/test/hydrators.js | 44 +- example-apps/onedrive/test/resources/file.js | 176 +-- .../onedrive/test/resources/folder.js | 234 ++-- example-apps/onedrive/test/test-utils.js | 52 +- example-apps/onedrive/test/utils.js | 80 +- example-apps/onedrive/utils.js | 99 +- example-apps/resource/index.js | 4 +- .../resource/test/resources/recipe.js | 32 +- example-apps/rest-hooks/index.js | 4 +- example-apps/rest-hooks/test/triggers.js | 20 +- .../search-or-create/test/creates.test.js | 2 +- .../search-or-create/test/searches.test.js | 2 +- example-apps/search/index.js | 4 +- example-apps/search/test/searches.js | 8 +- .../session-auth/test/authentication.test.js | 2 +- example-apps/trigger/index.js | 4 +- example-apps/trigger/test/triggers.js | 4 +- package.json | 20 +- packages/cli/package.json | 4 +- packages/cli/scripts/docs.js | 2 +- .../cli/scripts/set-app-template-versions.js | 22 +- .../cli/scripts/validate-app-templates.js | 6 +- packages/cli/src/generators/index.js | 22 +- packages/cli/src/oclif/ZapierBaseCommand.js | 8 +- packages/cli/src/oclif/commands/analytics.js | 8 +- packages/cli/src/oclif/commands/build.js | 4 +- .../cli/src/oclif/commands/cache/clear.js | 16 +- .../cli/src/oclif/commands/canary/delete.js | 10 +- .../cli/src/oclif/commands/canary/list.js | 12 +- packages/cli/src/oclif/commands/convert.js | 6 +- packages/cli/src/oclif/commands/deprecate.js | 4 +- packages/cli/src/oclif/commands/describe.js | 10 +- packages/cli/src/oclif/commands/env/set.js | 8 +- packages/cli/src/oclif/commands/env/unset.js | 4 +- packages/cli/src/oclif/commands/invoke.js | 100 +- packages/cli/src/oclif/commands/jobs.js | 2 +- packages/cli/src/oclif/commands/link.js | 4 +- packages/cli/src/oclif/commands/login.js | 26 +- packages/cli/src/oclif/commands/logout.js | 2 +- packages/cli/src/oclif/commands/logs.js | 4 +- packages/cli/src/oclif/commands/migrate.js | 14 +- packages/cli/src/oclif/commands/promote.js | 39 +- packages/cli/src/oclif/commands/push.js | 4 +- packages/cli/src/oclif/commands/register.js | 38 +- packages/cli/src/oclif/commands/scaffold.js | 6 +- packages/cli/src/oclif/commands/team/add.js | 6 +- packages/cli/src/oclif/commands/team/get.js | 4 +- .../cli/src/oclif/commands/team/remove.js | 12 +- packages/cli/src/oclif/commands/test.js | 8 +- packages/cli/src/oclif/commands/upload.js | 2 +- packages/cli/src/oclif/commands/users/add.js | 2 +- packages/cli/src/oclif/commands/users/get.js | 14 +- .../cli/src/oclif/commands/users/links.js | 8 +- .../cli/src/oclif/commands/users/remove.js | 4 +- packages/cli/src/oclif/commands/validate.js | 6 +- packages/cli/src/oclif/commands/versions.js | 2 +- .../src/oclif/hooks/checkValidNodeVersion.js | 2 +- packages/cli/src/oclif/hooks/deprecated.js | 2 +- .../hooks/getAppRegistrationFieldChoices.js | 8 +- packages/cli/src/oclif/hooks/versionInfo.js | 4 +- packages/cli/src/smoke-tests/smoke-tests.js | 16 +- packages/cli/src/tests/baseCommand.js | 22 +- .../tests/fixtures/registerFieldChoices.js | 6 +- packages/cli/src/tests/register.test.js | 18 +- packages/cli/src/tests/utils/ast.js | 52 +- packages/cli/src/tests/utils/build.js | 100 +- packages/cli/src/tests/utils/changelog.js | 8 +- .../src/tests/utils/check-missing-app-info.js | 4 +- packages/cli/src/tests/utils/convert.js | 28 +- packages/cli/src/tests/utils/display.js | 4 +- packages/cli/src/tests/utils/files.js | 38 +- .../cli/src/tests/utils/package-manager.js | 12 +- packages/cli/src/tests/utils/string.js | 6 +- packages/cli/src/utils/analytics.js | 2 +- packages/cli/src/utils/api.js | 55 +- packages/cli/src/utils/ast.js | 30 +- packages/cli/src/utils/auth-files-codegen.js | 201 +-- packages/cli/src/utils/build.js | 55 +- packages/cli/src/utils/changelog.js | 2 +- .../cli/src/utils/check-missing-app-info.js | 4 +- packages/cli/src/utils/convert.js | 46 +- packages/cli/src/utils/credentials.js | 2 +- packages/cli/src/utils/display.js | 4 +- packages/cli/src/utils/files.js | 6 +- packages/cli/src/utils/ignore.js | 4 +- packages/cli/src/utils/local.js | 2 +- packages/cli/src/utils/metadata.js | 2 +- packages/cli/src/utils/misc.js | 43 +- packages/cli/src/utils/promisify.js | 2 +- packages/cli/src/utils/scaffold.js | 24 +- packages/cli/src/utils/team.js | 6 +- packages/cli/src/utils/xdg.js | 6 +- packages/core/bin/upload-lambda.js | 2 +- .../core/integration-test/integration-test.js | 8 +- packages/core/smoke-test/smoke-test.js | 21 +- .../core/src/app-middlewares/after/checks.js | 4 +- .../app-middlewares/before/add-app-context.js | 2 +- .../src/app-middlewares/before/z-object.js | 8 +- .../src/checks/perform-buffer-return-type.js | 2 +- .../src/checks/trigger-has-unique-primary.js | 2 +- packages/core/src/errors.js | 10 +- packages/core/src/execute.js | 12 +- .../http-middlewares/after/log-response.js | 2 +- .../after/prepare-response.js | 2 +- .../before/add-digest-auth-header.js | 6 +- .../before/add-query-params.js | 2 +- .../before/oauth1-sign-request.js | 6 +- .../before/prepare-request.js | 4 +- packages/core/src/tools/cleaner.js | 10 +- packages/core/src/tools/create-app-tester.js | 4 +- packages/core/src/tools/create-cache.js | 13 +- packages/core/src/tools/create-dehydrator.js | 2 +- .../core/src/tools/create-file-stasher.js | 16 +- packages/core/src/tools/create-http-patch.js | 4 +- .../core/src/tools/create-lambda-handler.js | 2 +- packages/core/src/tools/create-logger.js | 6 +- .../core/src/tools/create-request-client.js | 2 +- .../core/src/tools/create-response-stasher.js | 4 +- packages/core/src/tools/create-rpc-client.js | 6 +- .../core/src/tools/create-storekey-tool.js | 2 +- packages/core/src/tools/data.js | 2 +- .../core/src/tools/ensure-json-encodable.js | 4 +- packages/core/src/tools/environment.js | 2 +- packages/core/src/tools/memoize.js | 2 +- packages/core/src/tools/memory-checker.js | 3 +- packages/core/src/tools/request-clean.js | 2 +- packages/core/src/tools/request-merge.js | 2 +- .../core/src/tools/resolve-method-path.js | 4 +- packages/core/src/tools/response-cleaner.js | 2 +- packages/core/src/tools/schema.js | 8 +- packages/core/src/tools/uploader.js | 4 +- packages/core/src/tools/wrap-hydrate.js | 4 +- packages/core/test/app-middleware.js | 16 +- packages/core/test/checks.js | 18 +- packages/core/test/create-app.js | 86 +- packages/core/test/create-request-client.js | 16 +- packages/core/test/errors.js | 6 +- .../test/fixtures/truncate-test-data.json | 11 +- packages/core/test/http-middleware.js | 14 +- packages/core/test/hydration.js | 18 +- packages/core/test/logger.js | 2 +- packages/core/test/misc-tools.js | 21 +- .../core/test/moduleuserapp/export-func.js | 2 +- packages/core/test/request-tools.js | 8 +- packages/core/test/test-should-paginate.js | 28 +- packages/core/test/test-tools.js | 14 +- packages/core/test/tools/callback-wrapper.js | 2 +- packages/core/test/tools/create-cache.js | 8 +- packages/core/test/tools/create-http-patch.js | 6 +- packages/core/test/tools/file-stasher.js | 48 +- packages/core/test/tools/promise.js | 16 +- .../core/test/tools/resolve-method-path.js | 24 +- packages/core/test/tools/rpc-client.js | 2 +- packages/core/test/tools/schema-tools.js | 2 +- packages/core/test/tools/schema.js | 14 +- packages/core/test/userapp/helpers.js | 5 +- packages/legacy-scripting-runner/bundle.js | 14 +- packages/legacy-scripting-runner/ci-test.js | 2 +- .../legacy-scripting-runner/exceptions.js | 4 +- packages/legacy-scripting-runner/index.js | 54 +- .../middleware-factory.js | 10 +- .../legacy-scripting-runner/test/bundle.js | 56 +- .../test/integration-test.js | 714 +++++----- .../legacy-scripting-runner/test/zfactory.js | 4 +- packages/legacy-scripting-runner/zfactory.js | 4 +- packages/schema/bin/export.js | 2 +- .../bufferedCreateConstraints.js | 22 +- .../deepNestedFields.js | 14 +- .../labelWhenVisible.js | 4 +- .../functional-constraints/matchingKeys.js | 4 +- .../mutuallyExclusiveFields.js | 6 +- .../functional-constraints/pollingThrottle.js | 4 +- .../requirePerformConditionally.js | 4 +- .../functional-constraints/requiredSamples.js | 6 +- .../searchOrCreateKeys.js | 58 +- .../uniqueInputFieldKeys.js | 13 +- packages/schema/lib/schemas/AppSchema.js | 5 +- .../AuthenticationCustomConfigSchema.js | 2 +- .../AuthenticationOAuth1ConfigSchema.js | 2 +- .../AuthenticationOAuth2ConfigSchema.js | 2 +- .../lib/schemas/AuthenticationSchema.js | 2 +- .../AuthenticationSessionConfigSchema.js | 2 +- .../lib/schemas/BasicActionOperationSchema.js | 4 +- .../BasicCreateActionOperationSchema.js | 4 +- .../lib/schemas/BasicHookOperationSchema.js | 4 +- .../schemas/BasicHookToPollOperationSchema.js | 4 +- .../lib/schemas/BasicOperationSchema.js | 10 +- .../schemas/BasicPollingOperationSchema.js | 4 +- packages/schema/lib/schemas/BulkReadSchema.js | 2 +- .../schema/lib/schemas/BulkReadsSchema.js | 2 +- packages/schema/lib/schemas/CreateSchema.js | 2 +- packages/schema/lib/schemas/CreatesSchema.js | 2 +- .../schema/lib/schemas/DynamicFieldsSchema.js | 2 +- .../lib/schemas/FieldChoiceWithLabelSchema.js | 2 +- .../schema/lib/schemas/FieldChoicesSchema.js | 2 +- .../lib/schemas/FieldOrFunctionSchema.js | 2 +- packages/schema/lib/schemas/FieldSchema.js | 2 +- packages/schema/lib/schemas/FieldsSchema.js | 2 +- packages/schema/lib/schemas/FunctionSchema.js | 2 +- .../schema/lib/schemas/HydratorsSchema.js | 2 +- .../schema/lib/schemas/MiddlewaresSchema.js | 2 +- .../lib/schemas/RedirectRequestSchema.js | 2 +- packages/schema/lib/schemas/RequestSchema.js | 2 +- .../lib/schemas/ResourceMethodCreateSchema.js | 2 +- .../lib/schemas/ResourceMethodGetSchema.js | 2 +- .../lib/schemas/ResourceMethodHookSchema.js | 2 +- .../lib/schemas/ResourceMethodListSchema.js | 2 +- .../lib/schemas/ResourceMethodSearchSchema.js | 2 +- packages/schema/lib/schemas/ResourceSchema.js | 2 +- .../lib/schemas/ResourcesMethodGetSchema.js | 2 +- .../schema/lib/schemas/ResourcesSchema.js | 2 +- .../lib/schemas/SearchAndCreatesSchema.js | 2 +- .../lib/schemas/SearchOrCreateSchema.js | 2 +- .../lib/schemas/SearchOrCreatesSchema.js | 2 +- packages/schema/lib/schemas/SearchSchema.js | 2 +- packages/schema/lib/schemas/SearchesSchema.js | 2 +- .../lib/schemas/ThrottleObjectSchema.js | 2 +- packages/schema/lib/schemas/TriggerSchema.js | 2 +- packages/schema/lib/schemas/TriggersSchema.js | 2 +- packages/schema/lib/utils/buildDocs.js | 4 +- packages/schema/lib/utils/exportSchema.js | 2 +- packages/schema/lib/utils/makeValidator.js | 10 +- packages/schema/smoke-test/smoke-test.js | 8 +- .../bufferedCreateConstraints.js | 18 +- .../deepNestedFields.js | 2 +- .../mutuallyExclusiveFields.js | 8 +- .../functional-constraints/pollingThrottle.js | 4 +- .../searchOrCreateKeys.js | 30 +- .../uniqueInputFieldKeys.js | 8 +- packages/schema/test/index.js | 14 +- packages/schema/test/readability.js | 10 +- schema-to-ts/package.json | 2 +- scripts/bump.js | 30 +- yarn.lock | 1219 ++++++++--------- 273 files changed, 2914 insertions(+), 3015 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc create mode 100644 eslint.config.cjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 399d1fdad..000000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -# this needs to combine all other eslintignore files so that lint-staged knows what to ignore -packages/cli/scaffold/*.js -packages/cli/src/generators/templates/**/*.template.js -.yarn diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 809c0405e..000000000 --- a/.eslintrc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": ["standard", "prettier"], - "plugins": ["mocha"], - "env": { - "es6": true, - "node": true - }, - "overrides": [ - { - "files": [ - "packages/*/test/**/*.js", - "packages/*/smoke-test/**/*.js", - "packages/*/integration-test/**/*.js", - "packages/cli/src/tests/**/*.js", - "packages/cli/src/smoke-tests/**/*.js" - ], - "rules": { - "mocha/no-exclusive-tests": "error" - }, - "env": { - "mocha": true - } - }, - { - "files": ["packages/cli/snippets/**/*.js"], - "rules": { - "no-unused-vars": 0 - }, - "env": { - "mocha": true // there's a mocha example in there - } - } - ] -} diff --git a/eslint.config.cjs b/eslint.config.cjs new file mode 100644 index 000000000..75b6a210f --- /dev/null +++ b/eslint.config.cjs @@ -0,0 +1,64 @@ +const mocha = require("eslint-plugin-mocha"); +const globals = require("globals"); +const js = require("@eslint/js"); + +const { + FlatCompat, +} = require("@eslint/eslintrc"); + +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +module.exports = [{ + ignores: [ + // this needs to combine all other eslintignore files so that lint-staged knows what to ignore + "packages/cli/scaffold/*.js", + "packages/cli/src/generators/templates/**/*.template.js", + "**/.yarn", + "example-apps/onedrive/test/*", + + ], +}, ...compat.extends("eslint:recommended", "standard", "prettier"), { + plugins: { + mocha, + }, + + languageOptions: { + globals: { + ...globals.node, + }, + }, +}, { + files: [ + "packages/*/test/**/*.js", + "packages/*/smoke-test/**/*.js", + "packages/*/integration-test/**/*.js", + "packages/cli/src/tests/**/*.js", + "packages/cli/src/smoke-tests/**/*.js", + ], + + languageOptions: { + globals: { + ...globals.mocha, + }, + }, + + rules: { + "mocha/no-exclusive-tests": "error", + }, +}, { + files: ["packages/cli/snippets/**/*.js"], + + languageOptions: { + globals: { + ...globals.mocha, + }, + }, + + rules: { + "no-unused-vars": 0, + }, +}]; diff --git a/example-apps/babel/src/index.js b/example-apps/babel/src/index.js index 906adc904..b3babc1b1 100644 --- a/example-apps/babel/src/index.js +++ b/example-apps/babel/src/index.js @@ -14,14 +14,14 @@ const App = { afterResponse: [], resources: { - [Recipe.key]: Recipe + [Recipe.key]: Recipe, }, triggers: {}, searches: {}, - creates: {} + creates: {}, }; export default App; diff --git a/example-apps/basic-auth/authentication.js b/example-apps/basic-auth/authentication.js index 7d656518c..b7751e231 100644 --- a/example-apps/basic-auth/authentication.js +++ b/example-apps/basic-auth/authentication.js @@ -17,7 +17,7 @@ const handleBadResponses = (response, z, bundle) => { // This message is surfaced to the user 'The username and/or password you supplied is incorrect', 'AuthenticationError', - response.status + response.status, ); } diff --git a/example-apps/basic-auth/test/authentication.test.js b/example-apps/basic-auth/test/authentication.test.js index 6d1b5c23a..83ec93108 100644 --- a/example-apps/basic-auth/test/authentication.test.js +++ b/example-apps/basic-auth/test/authentication.test.js @@ -18,7 +18,7 @@ describe('basic auth', () => { expect(response.status).toBe(200); expect(response.request.headers.Authorization).toBe( - 'Basic dXNlcjpzZWNyZXQ=' + 'Basic dXNlcjpzZWNyZXQ=', ); }); @@ -34,7 +34,7 @@ describe('basic auth', () => { await appTester(App.authentication.test, bundle); } catch (err) { expect(err.message).toContain( - 'The username and/or password you supplied is incorrect' + 'The username and/or password you supplied is incorrect', ); return; } diff --git a/example-apps/callback/test/creates.test.js b/example-apps/callback/test/creates.test.js index cc2177d62..a7d7f48ad 100644 --- a/example-apps/callback/test/creates.test.js +++ b/example-apps/callback/test/creates.test.js @@ -11,7 +11,7 @@ describe('creates', () => { const bundle = { inputData: { question: 'Will this work?' } }; const result = await appTester( App.creates.prediction.operation.perform, - bundle + bundle, ); expect(result).toMatchObject({ status: '...thinking...', @@ -35,7 +35,7 @@ describe('creates', () => { const result = await appTester( App.creates.prediction.operation.performResume, - bundle + bundle, ); expect(result).toMatchObject({ status: 'success', diff --git a/example-apps/create/index.js b/example-apps/create/index.js index dc26a8c91..8c4e023ea 100644 --- a/example-apps/create/index.js +++ b/example-apps/create/index.js @@ -21,8 +21,8 @@ const App = { // If you want your creates to show up, you better include it here! creates: { - [recipe.key]: recipe - } + [recipe.key]: recipe, + }, }; // Finally, export the app. diff --git a/example-apps/create/test/creates.js b/example-apps/create/test/creates.js index ee9dcd755..2b6f6e457 100644 --- a/example-apps/create/test/creates.js +++ b/example-apps/create/test/creates.js @@ -9,17 +9,17 @@ const appTester = zapier.createAppTester(App); describe('creates', () => { describe('create recipe create', () => { - it('should create a new recipe', done => { + it('should create a new recipe', (done) => { const bundle = { inputData: { name: 'Smith Family Recipe', directions: '1. Order out :)', - authorId: 1 - } + authorId: 1, + }, }; appTester(App.creates.recipe.operation.perform, bundle) - .then(result => { + .then((result) => { result.should.have.property('name'); done(); }) diff --git a/example-apps/custom-auth/authentication.js b/example-apps/custom-auth/authentication.js index 2a8bb5520..b4c9a25d0 100644 --- a/example-apps/custom-auth/authentication.js +++ b/example-apps/custom-auth/authentication.js @@ -17,7 +17,7 @@ const handleBadResponses = (response, z, bundle) => { // This message is surfaced to the user 'The API Key you supplied is incorrect', 'AuthenticationError', - response.status + response.status, ); } diff --git a/example-apps/digest-auth/authentication.js b/example-apps/digest-auth/authentication.js index 99dbf2ab9..a67319ea0 100644 --- a/example-apps/digest-auth/authentication.js +++ b/example-apps/digest-auth/authentication.js @@ -19,7 +19,7 @@ const handleBadResponses = (response, z, bundle) => { // This message is surfaced to the user 'The username and/or password you supplied is incorrect', 'AuthenticationError', - response.status + response.status, ); } diff --git a/example-apps/digest-auth/test/authentication.test.js b/example-apps/digest-auth/test/authentication.test.js index 83cb2771b..5c39a2386 100644 --- a/example-apps/digest-auth/test/authentication.test.js +++ b/example-apps/digest-auth/test/authentication.test.js @@ -35,7 +35,7 @@ describe('digest auth', () => { await appTester(App.authentication.test, bundle); } catch (err) { expect(err.message).toContain( - 'The username and/or password you supplied is incorrect' + 'The username and/or password you supplied is incorrect', ); return; } diff --git a/example-apps/dynamic-dropdown/test/triggers.test.js b/example-apps/dynamic-dropdown/test/triggers.test.js index 710bee87b..85ebe96a6 100644 --- a/example-apps/dynamic-dropdown/test/triggers.test.js +++ b/example-apps/dynamic-dropdown/test/triggers.test.js @@ -15,7 +15,7 @@ describe('triggers', () => { const results = await appTester( App.triggers.species.operation.perform, - bundle + bundle, ); expect(results.length).toBeGreaterThan(1); @@ -33,7 +33,7 @@ describe('triggers', () => { const results = await appTester( App.triggers.people.operation.perform, - bundle + bundle, ); expect(results.length).toBeGreaterThan(1); diff --git a/example-apps/files/test/creates.test.js b/example-apps/files/test/creates.test.js index fd187bb41..2c2bdecca 100644 --- a/example-apps/files/test/creates.test.js +++ b/example-apps/files/test/creates.test.js @@ -18,7 +18,7 @@ describe('uploadFile', () => { test('upload file v10', async () => { if (CORE_VERSION[0] < 10) { console.warn( - `skipped because this only works on core v10+ and you're on ${zapier.version}` + `skipped because this only works on core v10+ and you're on ${zapier.version}`, ); return; } @@ -34,7 +34,7 @@ describe('uploadFile', () => { const result = await appTester( App.creates.uploadFile_v10.operation.perform, - bundle + bundle, ); expect(result.filename).toBe('sample.pdf'); expect(result.file.sha1).toBe(EXPECTED_SHA1); @@ -52,7 +52,7 @@ describe('uploadFile', () => { const result = await appTester( App.creates.uploadFile_v9.operation.perform, - bundle + bundle, ); expect(result.filename).toBe('sample.pdf'); expect(result.file.sha1).toBe(EXPECTED_SHA1); diff --git a/example-apps/files/test/hydrators.test.js b/example-apps/files/test/hydrators.test.js index 850828c00..edee3b56e 100644 --- a/example-apps/files/test/hydrators.test.js +++ b/example-apps/files/test/hydrators.test.js @@ -21,7 +21,7 @@ describe('downloadFile', () => { const url = await appTester(App.hydrators.downloadFile, bundle); expect(url).toContain( - 'https://zapier-dev-files.s3.amazonaws.com/cli-platform/' + 'https://zapier-dev-files.s3.amazonaws.com/cli-platform/', ); }); }); diff --git a/example-apps/files/test/triggers.test.js b/example-apps/files/test/triggers.test.js index 304b60b95..da45d9b87 100644 --- a/example-apps/files/test/triggers.test.js +++ b/example-apps/files/test/triggers.test.js @@ -11,7 +11,7 @@ describe('newFile', () => { const bundle = {}; const results = await appTester( App.triggers.newFile.operation.perform, - bundle + bundle, ); expect(results.length).toBeGreaterThan(0); diff --git a/example-apps/github/samples/sample_issue.js b/example-apps/github/samples/sample_issue.js index 1a1e64fa0..1906f3ca9 100644 --- a/example-apps/github/samples/sample_issue.js +++ b/example-apps/github/samples/sample_issue.js @@ -31,7 +31,7 @@ module.exports = { events_url: 'https://api.github.com/users/octocat/events{/privacy}', received_events_url: 'https://api.github.com/users/octocat/received_events', type: 'User', - site_admin: false + site_admin: false, }, labels: [ { @@ -39,8 +39,8 @@ module.exports = { url: 'https://api.github.com/repos/octocat/Hello-World/labels/bug', name: 'bug', color: 'f29513', - default: true - } + default: true, + }, ], assignee: { login: 'octocat', @@ -60,7 +60,7 @@ module.exports = { events_url: 'https://api.github.com/users/octocat/events{/privacy}', received_events_url: 'https://api.github.com/users/octocat/received_events', type: 'User', - site_admin: false + site_admin: false, }, assignees: [ { @@ -83,8 +83,8 @@ module.exports = { received_events_url: 'https://api.github.com/users/octocat/received_events', type: 'User', - site_admin: false - } + site_admin: false, + }, ], milestone: { url: 'https://api.github.com/repos/octocat/Hello-World/milestones/1', @@ -116,14 +116,14 @@ module.exports = { received_events_url: 'https://api.github.com/users/octocat/received_events', type: 'User', - site_admin: false + site_admin: false, }, open_issues: 4, closed_issues: 8, created_at: '2011-04-10T20:09:31Z', updated_at: '2014-03-03T18:58:10Z', closed_at: '2013-02-12T13:22:01Z', - due_on: '2012-10-09T23:39:01Z' + due_on: '2012-10-09T23:39:01Z', }, locked: false, comments: 0, @@ -131,7 +131,7 @@ module.exports = { url: 'https://api.github.com/repos/octocat/Hello-World/pulls/1347', html_url: 'https://github.com/octocat/Hello-World/pull/1347', diff_url: 'https://github.com/octocat/Hello-World/pull/1347.diff', - patch_url: 'https://github.com/octocat/Hello-World/pull/1347.patch' + patch_url: 'https://github.com/octocat/Hello-World/pull/1347.patch', }, closed_at: null, created_at: '2011-04-22T13:33:48Z', @@ -154,6 +154,6 @@ module.exports = { events_url: 'https://api.github.com/users/octocat/events{/privacy}', received_events_url: 'https://api.github.com/users/octocat/received_events', type: 'User', - site_admin: false - } + site_admin: false, + }, }; diff --git a/example-apps/github/samples/sample_repo_list.js b/example-apps/github/samples/sample_repo_list.js index 5b0641da1..c9c03f4be 100644 --- a/example-apps/github/samples/sample_repo_list.js +++ b/example-apps/github/samples/sample_repo_list.js @@ -18,7 +18,7 @@ module.exports = { events_url: 'https://api.github.com/users/octocat/events{/privacy}', received_events_url: 'https://api.github.com/users/octocat/received_events', type: 'User', - site_admin: false + site_admin: false, }, name: 'Hello-World', full_name: 'octocat/Hello-World', @@ -109,7 +109,7 @@ module.exports = { permissions: { admin: false, push: false, - pull: true + pull: true, }, allow_rebase_merge: true, allow_squash_merge: true, @@ -121,6 +121,6 @@ module.exports = { name: 'MIT License', spdx_id: 'MIT', url: 'https://api.github.com/licenses/mit', - html_url: 'https://choosealicense.com/licenses/mit/' - } + html_url: 'https://choosealicense.com/licenses/mit/', + }, }; diff --git a/example-apps/github/test/authentication.test.js b/example-apps/github/test/authentication.test.js index 83aeb1265..254ff7e1c 100644 --- a/example-apps/github/test/authentication.test.js +++ b/example-apps/github/test/authentication.test.js @@ -24,7 +24,7 @@ describe('oauth2 app', () => { // It's a good idea to store your Client ID and Secret in the environment rather than in code. if (!(process.env.CLIENT_ID && process.env.CLIENT_SECRET)) { throw new Error( - `Before running the tests, make sure CLIENT_ID and CLIENT_SECRET are available in the environment.` + `Before running the tests, make sure CLIENT_ID and CLIENT_SECRET are available in the environment.`, ); } }); @@ -48,11 +48,11 @@ describe('oauth2 app', () => { const authorizeUrl = await appTester( App.authentication.oauth2Config.authorizeUrl, - bundle + bundle, ); expect(authorizeUrl).toBe( - 'https://github.com/login/oauth/authorize?client_id=1234&state=4444&redirect_uri=https%3A%2F%2Fzapier.com%2F&response_type=code' + 'https://github.com/login/oauth/authorize?client_id=1234&state=4444&redirect_uri=https%3A%2F%2Fzapier.com%2F&response_type=code', ); }); }); @@ -70,7 +70,7 @@ describe('getAccessToken', () => { it('returns the expected tokens', async () => { const result = await appTester( - App.authentication.oauth2Config.getAccessToken + App.authentication.oauth2Config.getAccessToken, ); expect(result.access_token).toBe('someAccessToken'); }); diff --git a/example-apps/middleware/test/triggers.js b/example-apps/middleware/test/triggers.js index ea9cb1c8c..be4b3c36d 100644 --- a/example-apps/middleware/test/triggers.js +++ b/example-apps/middleware/test/triggers.js @@ -9,9 +9,9 @@ const appTester = zapier.createAppTester(App); describe('triggers', () => { describe('new recipe trigger', () => { - it('should load recipes', done => { + it('should load recipes', (done) => { appTester(App.triggers.recipe.operation.perform) - .then(results => { + .then((results) => { results.should.be.an.Array(); results.length.should.be.above(1); @@ -31,9 +31,9 @@ describe('triggers', () => { }); describe('new movie trigger', () => { - it('should load movies', done => { + it('should load movies', (done) => { appTester(App.triggers.movie.operation.perform) - .then(results => { + .then((results) => { results.should.be.an.Array(); results.length.should.be.above(1); diff --git a/example-apps/oauth1-trello/test/authentication.test.js b/example-apps/oauth1-trello/test/authentication.test.js index dfdeb9476..b94afe46f 100644 --- a/example-apps/oauth1-trello/test/authentication.test.js +++ b/example-apps/oauth1-trello/test/authentication.test.js @@ -24,7 +24,7 @@ describe('oauth1 app', () => { // It's a good idea to store your Client ID and Secret in the environment rather than in code. if (!(process.env.CLIENT_ID && process.env.CLIENT_SECRET)) { throw new Error( - `Before running the tests, make sure CLIENT_ID and CLIENT_SECRET are available in the environment.` + `Before running the tests, make sure CLIENT_ID and CLIENT_SECRET are available in the environment.`, ); } }); @@ -38,7 +38,7 @@ describe('oauth1 app', () => { }; const tokens = await appTester( App.authentication.oauth1Config.getRequestToken, - bundle + bundle, ); expect(tokens).toHaveProperty('oauth_token'); expect(tokens).toHaveProperty('oauth_token_secret'); @@ -55,11 +55,11 @@ describe('oauth1 app', () => { const authorizeUrl = await appTester( App.authentication.oauth1Config.authorizeUrl, - bundle + bundle, ); expect(authorizeUrl).toBe( - 'https://trello.com/1/OAuthAuthorizeToken?oauth_token=4444&name=Zapier%2FTrello%20OAuth1%20Test' + 'https://trello.com/1/OAuthAuthorizeToken?oauth_token=4444&name=Zapier%2FTrello%20OAuth1%20Test', ); }); }); diff --git a/example-apps/oauth1-tumblr/authentication.js b/example-apps/oauth1-tumblr/authentication.js index e2ca50cd7..9cd9d7779 100644 --- a/example-apps/oauth1-tumblr/authentication.js +++ b/example-apps/oauth1-tumblr/authentication.js @@ -22,14 +22,14 @@ const config = { oauth_consumer_key: '{{process.env.CLIENT_ID}}', oauth_consumer_secret: '{{process.env.CLIENT_SECRET}}', oauth_signature_method: 'HMAC-SHA1', - oauth_callback: '{{bundle.inputData.redirect_uri}}' - } + oauth_callback: '{{bundle.inputData.redirect_uri}}', + }, }, authorizeUrl: { url: AUTHORIZE_URL, params: { - oauth_token: '{{bundle.inputData.oauth_token}}' - } + oauth_token: '{{bundle.inputData.oauth_token}}', + }, }, getAccessToken: { url: ACCESS_TOKEN_URL, @@ -39,14 +39,14 @@ const config = { oauth_consumer_secret: '{{process.env.CLIENT_SECRET}}', oauth_token: '{{bundle.inputData.oauth_token}}', oauth_token_secret: '{{bundle.inputData.oauth_token_secret}}', - oauth_verifier: '{{bundle.inputData.oauth_verifier}}' - } - } + oauth_verifier: '{{bundle.inputData.oauth_verifier}}', + }, + }, }, test: { - url: 'https://api.tumblr.com/v2/user/info' + url: 'https://api.tumblr.com/v2/user/info', }, - connectionLabel: getConnectionLabel + connectionLabel: getConnectionLabel, }; // A middleware that is run before z.request() actually makes the request. Here we're @@ -64,7 +64,7 @@ const includeAccessToken = (req, z, bundle) => { oauth_consumer_key: process.env.CLIENT_ID, oauth_consumer_secret: process.env.CLIENT_SECRET, oauth_token: bundle.authData.oauth_token, - oauth_token_secret: bundle.authData.oauth_token_secret + oauth_token_secret: bundle.authData.oauth_token_secret, }); } return req; @@ -72,5 +72,5 @@ const includeAccessToken = (req, z, bundle) => { module.exports = { config, - includeAccessToken + includeAccessToken, }; diff --git a/example-apps/oauth1-tumblr/index.js b/example-apps/oauth1-tumblr/index.js index 5186452fe..879dfaeda 100644 --- a/example-apps/oauth1-tumblr/index.js +++ b/example-apps/oauth1-tumblr/index.js @@ -20,14 +20,14 @@ const App = { // If you want your trigger to show up, you better include it here! triggers: { - [LikeTrigger.key]: LikeTrigger + [LikeTrigger.key]: LikeTrigger, }, // If you want your searches to show up, you better include it here! searches: {}, // If you want your creates to show up, you better include it here! - creates: {} + creates: {}, }; // Finally, export the app. diff --git a/example-apps/oauth1-tumblr/test/index.js b/example-apps/oauth1-tumblr/test/index.js index b215c3578..84cb64d92 100644 --- a/example-apps/oauth1-tumblr/test/index.js +++ b/example-apps/oauth1-tumblr/test/index.js @@ -9,7 +9,7 @@ require('should'); // const appTester = zapier.createAppTester(App); describe('My App', () => { - it('should test something', done => { + it('should test something', (done) => { const x = 1; x.should.eql(1); diff --git a/example-apps/oauth1-twitter/index.js b/example-apps/oauth1-twitter/index.js index 5186452fe..879dfaeda 100644 --- a/example-apps/oauth1-twitter/index.js +++ b/example-apps/oauth1-twitter/index.js @@ -20,14 +20,14 @@ const App = { // If you want your trigger to show up, you better include it here! triggers: { - [LikeTrigger.key]: LikeTrigger + [LikeTrigger.key]: LikeTrigger, }, // If you want your searches to show up, you better include it here! searches: {}, // If you want your creates to show up, you better include it here! - creates: {} + creates: {}, }; // Finally, export the app. diff --git a/example-apps/oauth1-twitter/triggers/like.js b/example-apps/oauth1-twitter/triggers/like.js index baf2727a5..b2cc4495b 100644 --- a/example-apps/oauth1-twitter/triggers/like.js +++ b/example-apps/oauth1-twitter/triggers/like.js @@ -4,12 +4,12 @@ module.exports = { display: { label: 'New Like', - description: 'Triggers when you like a tweet.' + description: 'Triggers when you like a tweet.', }, operation: { perform: { - url: 'https://api.twitter.com/1.1/favorites/list.json' + url: 'https://api.twitter.com/1.1/favorites/list.json', }, sample: { coordinates: null, @@ -21,10 +21,9 @@ module.exports = { entities: { urls: [], hashtags: [], - user_mentions: [] + user_mentions: [], }, - text: - "Note to self: don't die during off-peak hours on a holiday weekend.", + text: "Note to self: don't die during off-peak hours on a holiday weekend.", contributors: null, id: 243014525132091400, retweet_count: 0, @@ -49,8 +48,8 @@ module.exports = { profile_link_color: '2FC2EF', entities: { description: { - urls: [] - } + urls: [], + }, }, favourites_count: 594, url: null, @@ -82,7 +81,7 @@ module.exports = { statuses_count: 2629, following: true, screen_name: 'theSeanCook', - show_all_inline_media: true + show_all_inline_media: true, }, place: { name: 'San Francisco', @@ -97,15 +96,15 @@ module.exports = { [-122.51368188, 37.70813196], [-122.35845384, 37.70813196], [-122.35845384, 37.83245301], - [-122.51368188, 37.83245301] - ] + [-122.51368188, 37.83245301], + ], ], - type: 'Polygon' + type: 'Polygon', }, full_name: 'San Francisco, CA', - place_type: 'city' + place_type: 'city', }, - in_reply_to_status_id: null - } - } + in_reply_to_status_id: null, + }, + }, }; diff --git a/example-apps/oauth2/test/authentication.test.js b/example-apps/oauth2/test/authentication.test.js index a8275023b..cff9e789b 100644 --- a/example-apps/oauth2/test/authentication.test.js +++ b/example-apps/oauth2/test/authentication.test.js @@ -23,7 +23,7 @@ describe('oauth2 app', () => { // It's a good idea to store your Client ID and Secret in the environment rather than in code. if (!(process.env.CLIENT_ID && process.env.CLIENT_SECRET)) { throw new Error( - `Before running the tests, make sure CLIENT_ID and CLIENT_SECRET are available in the environment.` + `Before running the tests, make sure CLIENT_ID and CLIENT_SECRET are available in the environment.`, ); } }); @@ -43,11 +43,11 @@ describe('oauth2 app', () => { const authorizeUrl = await appTester( App.authentication.oauth2Config.authorizeUrl, - bundle + bundle, ); expect(authorizeUrl).toBe( - 'https://auth-json-server.zapier-staging.com/oauth/authorize?client_id=1234&state=4444&redirect_uri=https%3A%2F%2Fzapier.com%2F&response_type=code' + 'https://auth-json-server.zapier-staging.com/oauth/authorize?client_id=1234&state=4444&redirect_uri=https%3A%2F%2Fzapier.com%2F&response_type=code', ); }); @@ -75,7 +75,7 @@ describe('oauth2 app', () => { const result = await appTester( App.authentication.oauth2Config.getAccessToken, - bundle + bundle, ); expect(result.access_token).toBe('a_token'); @@ -98,7 +98,7 @@ describe('oauth2 app', () => { const result = await appTester( App.authentication.oauth2Config.refreshAccessToken, - bundle + bundle, ); expect(result.access_token).toBe('a_token'); }); diff --git a/example-apps/onedrive/.eslintrc.json b/example-apps/onedrive/.eslintrc.json index 454c3349d..61203657d 100644 --- a/example-apps/onedrive/.eslintrc.json +++ b/example-apps/onedrive/.eslintrc.json @@ -11,19 +11,19 @@ "comma-spacing": 2, "consistent-return": 2, "curly": [2, "all"], - "dot-notation": [2, {"allowKeywords": true}], + "dot-notation": [2, { "allowKeywords": true }], "eol-last": 2, "eqeqeq": [2, "smart"], "indent": [2, 2], "jsx-quotes": [2, "prefer-double"], - "key-spacing": [2, {"beforeColon": false, "afterColon": true}], + "key-spacing": [2, { "beforeColon": false, "afterColon": true }], "keyword-spacing": 2, "new-cap": 0, "new-parens": 2, "no-alert": 2, "no-array-constructor": 2, "no-caller": 2, - "no-console": [2, {"allow": ["info", "warn", "error"]}], + "no-console": [2, { "allow": ["info", "warn", "error"] }], "no-delete-var": 2, "no-eval": 2, "no-extend-native": 2, @@ -59,14 +59,21 @@ "no-undef-init": 2, "no-underscore-dangle": 0, "no-unused-expressions": 2, - "no-unused-vars": [2, {"vars": "all", "args": "after-used", "varsIgnorePattern": "should"}], + "no-unused-vars": [ + 2, + { "vars": "all", "args": "after-used", "varsIgnorePattern": "should" } + ], "no-use-before-define": 2, "no-with": 2, - "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}], + "quotes": [ + 2, + "single", + { "avoidEscape": true, "allowTemplateLiterals": true } + ], "semi": 2, - "semi-spacing": [2, {"before": false, "after": true}], + "semi-spacing": [2, { "before": false, "after": true }], "space-infix-ops": 2, - "space-unary-ops": [2, {"words": true, "nonwords": false}], + "space-unary-ops": [2, { "words": true, "nonwords": false }], "strict": [0, "never"], "yoda": [2, "never"] }, diff --git a/example-apps/onedrive/authentication.js b/example-apps/onedrive/authentication.js index 0d8153f6c..6c717d428 100644 --- a/example-apps/onedrive/authentication.js +++ b/example-apps/onedrive/authentication.js @@ -1,44 +1,44 @@ -'use strict' +'use strict'; -const baseOauthUrl = 'https://login.microsoftonline.com/common/oauth2' +const baseOauthUrl = 'https://login.microsoftonline.com/common/oauth2'; // To get your OAuth2 redirect URI, run `zapier describe` and update this variable. // Will looke like 'https://zapier.com/dashboard/auth/oauth/return/App123CLIAPI/' -const redirectUri = '' +const redirectUri = ''; const getAuthorizeURL = (z, bundle) => { - let url = `${baseOauthUrl}/v2.0/authorize` + let url = `${baseOauthUrl}/v2.0/authorize`; const urlParts = [ `client_id=${process.env.CLIENT_ID}`, `redirect_uri=${encodeURIComponent(bundle.inputData.redirect_uri)}`, 'response_type=code', - ] + ]; if (bundle.inputData.accountType === 'business') { - url = `${baseOauthUrl}/authorize` + url = `${baseOauthUrl}/authorize`; } else { - urlParts.push(`state=${bundle.inputData.state}`) + urlParts.push(`state=${bundle.inputData.state}`); } - const finalUrl = `${url}?${urlParts.join('&')}` + const finalUrl = `${url}?${urlParts.join('&')}`; - return finalUrl -} + return finalUrl; +}; const getAccessToken = (z, bundle) => { - let url = `${baseOauthUrl}/v2.0/token` + let url = `${baseOauthUrl}/v2.0/token`; const body = { code: bundle.inputData.code, client_id: process.env.CLIENT_ID, client_secret: process.env.CLIENT_SECRET, grant_type: 'authorization_code', - } + }; if (bundle.inputData.accountType === 'business') { - url = `${baseOauthUrl}/token` - body.redirect_uri = redirectUri - body.resource = 'https://graph.microsoft.com/' + url = `${baseOauthUrl}/token`; + body.redirect_uri = redirectUri; + body.resource = 'https://graph.microsoft.com/'; } const promise = z.request(url, { @@ -47,29 +47,29 @@ const getAccessToken = (z, bundle) => { headers: { 'content-type': 'application/x-www-form-urlencoded', }, - }) + }); return promise.then((response) => ({ access_token: response.data.access_token, refresh_token: response.data.refresh_token, id_token: response.data.id_token, - })) -} + })); +}; const refreshAccessToken = (z, bundle) => { - let url = `${baseOauthUrl}/v2.0/token` + let url = `${baseOauthUrl}/v2.0/token`; const body = { refresh_token: bundle.authData.refresh_token, client_id: process.env.CLIENT_ID, client_secret: process.env.CLIENT_SECRET, grant_type: 'refresh_token', - } + }; if (bundle.authData.accountType === 'business') { - url = `${baseOauthUrl}/token` - body.redirect_uri = redirectUri - body.resource = 'https://graph.microsoft.com/' + url = `${baseOauthUrl}/token`; + body.redirect_uri = redirectUri; + body.resource = 'https://graph.microsoft.com/'; } const promise = z.request(url, { @@ -78,14 +78,14 @@ const refreshAccessToken = (z, bundle) => { headers: { 'content-type': 'application/x-www-form-urlencoded', }, - }) + }); return promise.then((response) => ({ access_token: response.data.access_token, refresh_token: response.data.refresh_token, id_token: response.data.id_token, - })) -} + })); +}; // The test call Zapier makes to ensure an access token is valid // UX TIP: Hit an endpoint that always returns data with valid credentials, @@ -94,10 +94,10 @@ const refreshAccessToken = (z, bundle) => { const testAuth = (z) => { const promise = z.request({ url: 'https://graph.microsoft.com/v1.0/me', - }) + }); - return promise.then((response) => response.data) -} + return promise.then((response) => response.data); +}; module.exports = { type: 'oauth2', @@ -124,4 +124,4 @@ module.exports = { required: true, }, ], -} +}; diff --git a/example-apps/onedrive/before-handlers.js b/example-apps/onedrive/before-handlers.js index 739bc9061..526bca9f1 100644 --- a/example-apps/onedrive/before-handlers.js +++ b/example-apps/onedrive/before-handlers.js @@ -10,5 +10,5 @@ const includeBearerToken = (request, z, bundle) => { }; module.exports = { - includeBearerToken + includeBearerToken, }; diff --git a/example-apps/onedrive/constants.js b/example-apps/onedrive/constants.js index 9c30b89cf..664d1563e 100644 --- a/example-apps/onedrive/constants.js +++ b/example-apps/onedrive/constants.js @@ -1,12 +1,12 @@ -'use strict' +'use strict'; -const BASE_ITEM_URL = 'https://graph.microsoft.com/v1.0' +const BASE_ITEM_URL = 'https://graph.microsoft.com/v1.0'; -const BIG_FILE_MSG = 'File contents too big.' -const BINARY_CONTENT_MSG = 'Binary contents unsupported.' +const BIG_FILE_MSG = 'File contents too big.'; +const BINARY_CONTENT_MSG = 'Binary contents unsupported.'; module.exports = { BASE_ITEM_URL, BIG_FILE_MSG, - BINARY_CONTENT_MSG -} + BINARY_CONTENT_MSG, +}; diff --git a/example-apps/onedrive/creates/text-file.js b/example-apps/onedrive/creates/text-file.js index bacbbb597..8071363ce 100644 --- a/example-apps/onedrive/creates/text-file.js +++ b/example-apps/onedrive/creates/text-file.js @@ -1,21 +1,21 @@ -'use strict' +'use strict'; -const utils = require('../utils') -const getStringByteSize = utils.getStringByteSize -const baseItem = require('../resources/base-item') -const fileResource = require('../resources/file') +const utils = require('../utils'); +const getStringByteSize = utils.getStringByteSize; +const baseItem = require('../resources/base-item'); +const fileResource = require('../resources/file'); const createTextFile = (z, bundle) => { - const folder = bundle.inputData.folder || '' - let name = `${bundle.inputData.name}.txt` + const folder = bundle.inputData.folder || ''; + let name = `${bundle.inputData.name}.txt`; // Remove potential duplicate extension if (name.endsWith('.txt.txt')) { - name = name.slice(0, -4) + name = name.slice(0, -4); } - const fileSize = getStringByteSize(bundle.inputData.file) - const contentType = 'text/plain; charset=UTF-8' + const fileSize = getStringByteSize(bundle.inputData.file); + const contentType = 'text/plain; charset=UTF-8'; return baseItem.handleCreateWithSession( z, @@ -24,9 +24,9 @@ const createTextFile = (z, bundle) => { fileSize, contentType, folder, - name - ) -} + name, + ); +}; module.exports = { key: 'textFile', @@ -77,4 +77,4 @@ module.exports = { outputFields: fileResource.outputFields, }, -} +}; diff --git a/example-apps/onedrive/hydrators.js b/example-apps/onedrive/hydrators.js index 653e5b373..5eb4f597d 100644 --- a/example-apps/onedrive/hydrators.js +++ b/example-apps/onedrive/hydrators.js @@ -1,24 +1,24 @@ -'use strict' +'use strict'; -const utils = require('./utils') -const handleError = utils.handleError -const getStringByteSize = utils.getStringByteSize +const utils = require('./utils'); +const handleError = utils.handleError; +const getStringByteSize = utils.getStringByteSize; const { BASE_ITEM_URL, BIG_FILE_MSG, - BINARY_CONTENT_MSG -} = require('./constants') + BINARY_CONTENT_MSG, +} = require('./constants'); const getFileContents = (z, bundle) => { const options = { - url: `${BASE_ITEM_URL}/me/drive/items/${bundle.inputData.id}/content` - } + url: `${BASE_ITEM_URL}/me/drive/items/${bundle.inputData.id}/content`, + }; return z .request(options) .then((response) => { - const fileContents = response.content - const fileSize = getStringByteSize(fileContents) + const fileContents = response.content; + const fileSize = getStringByteSize(fileContents); // UX TIP: It's good to be mindful of how users will consume the outputs // of your app and how those outputs travel through Zapier. @@ -33,18 +33,18 @@ const getFileContents = (z, bundle) => { // app providing a field that the user wants to map into text inputs in // other Actions. if (fileSize >= 100 * 1024) { - return BIG_FILE_MSG + return BIG_FILE_MSG; } try { - return decodeURIComponent(fileContents) + return decodeURIComponent(fileContents); } catch (e) { - return BINARY_CONTENT_MSG + return BINARY_CONTENT_MSG; } }) - .catch(handleError) -} + .catch(handleError); +}; module.exports = { - getFileContents -} + getFileContents, +}; diff --git a/example-apps/onedrive/index.js b/example-apps/onedrive/index.js index ba33c3c33..4295be928 100644 --- a/example-apps/onedrive/index.js +++ b/example-apps/onedrive/index.js @@ -1,10 +1,10 @@ -const authentication = require('./authentication') -const { includeBearerToken } = require('./before-handlers') -const hydrators = require('./hydrators') +const authentication = require('./authentication'); +const { includeBearerToken } = require('./before-handlers'); +const hydrators = require('./hydrators'); -const folder = require('./resources/folder') -const file = require('./resources/file') -const createTextFile = require('./creates/text-file') +const folder = require('./resources/folder'); +const file = require('./resources/file'); +const createTextFile = require('./creates/text-file'); // We can roll up all our behaviors in an App. const App = { @@ -29,7 +29,7 @@ const App = { */ resources: { [folder.key]: folder, - [file.key]: file + [file.key]: file, }, triggers: {}, @@ -40,8 +40,8 @@ const App = { * allow users to create plain text files, so we register that create here. */ creates: { - [createTextFile.key]: createTextFile - } -} + [createTextFile.key]: createTextFile, + }, +}; -module.exports = App +module.exports = App; diff --git a/example-apps/onedrive/resources/base-item.js b/example-apps/onedrive/resources/base-item.js index 127ad6f3c..0a508a78e 100644 --- a/example-apps/onedrive/resources/base-item.js +++ b/example-apps/onedrive/resources/base-item.js @@ -1,23 +1,23 @@ -'use strict' +'use strict'; // // This is what file and folder use as a "base" // -const _ = require('lodash') -const fetch = require('node-fetch') +const _ = require('lodash'); +const fetch = require('node-fetch'); -const utils = require('../utils') -const hydrators = require('../hydrators') -const parseResponse = utils.parseResponse -const handleError = utils.handleError -const cleanupPaths = utils.cleanupPaths -const { BASE_ITEM_URL } = require('../constants') +const utils = require('../utils'); +const hydrators = require('../hydrators'); +const parseResponse = utils.parseResponse; +const handleError = utils.handleError; +const cleanupPaths = utils.cleanupPaths; +const { BASE_ITEM_URL } = require('../constants'); const getItem = (itemType, z, bundle) => { const options = { url: `${BASE_ITEM_URL}/me/drive/items/${bundle.inputData.id}`, - } + }; return z .request(options) .then(_.partial(parseResponse, z, itemType)) @@ -26,24 +26,24 @@ const getItem = (itemType, z, bundle) => { if (item.file) { item.fileContents = z.dehydrate(hydrators.getFileContents, { id: item.id, - }) + }); } - return item + return item; }) - .catch(handleError) -} + .catch(handleError); +}; const listItems = (itemType, z, bundle) => { - let folder = bundle.inputData.folder || '' + let folder = bundle.inputData.folder || ''; if (folder) { - folder = `:${encodeURIComponent(folder)}:` // OneDrive's URL format + folder = `:${encodeURIComponent(folder)}:`; // OneDrive's URL format } const options = { url: `${BASE_ITEM_URL}/me/drive/root${folder}/children`, - } + }; return z .request(options) @@ -54,34 +54,34 @@ const listItems = (itemType, z, bundle) => { if (item.file) { item.fileContents = z.dehydrate(hydrators.getFileContents, { id: item.id, - }) + }); } - }) + }); - return items + return items; }) - .catch(handleError) -} + .catch(handleError); +}; const searchItem = (itemType, z, bundle) => { - let folder = bundle.inputData.folder || '' + let folder = bundle.inputData.folder || ''; if (folder) { - folder = `:${encodeURIComponent(folder)}:` // OneDrive's URL format + folder = `:${encodeURIComponent(folder)}:`; // OneDrive's URL format } const options = { url: `${BASE_ITEM_URL}/me/drive/root${folder}/search(q='${encodeURIComponent( - bundle.inputData.name + bundle.inputData.name, )}')`, - } + }; return z .request(options) .then(_.partial(parseResponse, z, itemType)) .then(cleanupPaths) - .catch(handleError) -} + .catch(handleError); +}; // Note this only works for files, but is here so creates/text-file can reuse it const handleCreateWithSession = ( @@ -91,13 +91,13 @@ const handleCreateWithSession = ( fileSize, fileContentType, folder, - name + name, ) => { if (folder) { - folder = encodeURIComponent(folder) + folder = encodeURIComponent(folder); } - name = encodeURIComponent(name) + name = encodeURIComponent(name); return z .request({ @@ -113,12 +113,12 @@ const handleCreateWithSession = ( }, }) .then((response) => { - const uploadUrl = response.data.uploadUrl + const uploadUrl = response.data.uploadUrl; // This should work fine for files up to 60MB (https://dev.onedrive.com/items/upload_large_files.htm#upload-fragments) if (!fileContentType.includes('charset')) { - fileContentType += '; charset=UTF-8' + fileContentType += '; charset=UTF-8'; } // CODE TIP: If you define beforeRequest handlers, then end up in a @@ -132,23 +132,23 @@ const handleCreateWithSession = ( 'content-length': fileSize, 'content-range': `bytes 0-${fileSize - 1}/${fileSize}`, }, - }) + }); }) .then((response) => response.text()) .then((content) => { - const resourceId = z.JSON.parse(content).id + const resourceId = z.JSON.parse(content).id; bundle.inputData = { id: resourceId, - } + }; - return _.partial(getItem, 'file')(z, bundle) + return _.partial(getItem, 'file')(z, bundle); }) - .catch(handleError) -} + .catch(handleError); +}; module.exports = { getItem, listItems, searchItem, handleCreateWithSession, -} +}; diff --git a/example-apps/onedrive/resources/file.js b/example-apps/onedrive/resources/file.js index 601ec65b8..a441dce34 100644 --- a/example-apps/onedrive/resources/file.js +++ b/example-apps/onedrive/resources/file.js @@ -1,25 +1,25 @@ -'use strict' +'use strict'; -const _ = require('lodash') +const _ = require('lodash'); -const utils = require('../utils') -const handleError = utils.handleError -const getFileDetailsFromRequest = utils.getFileDetailsFromRequest -const baseItem = require('./base-item') +const utils = require('../utils'); +const handleError = utils.handleError; +const getFileDetailsFromRequest = utils.getFileDetailsFromRequest; +const baseItem = require('./base-item'); -const getFile = _.partial(baseItem.getItem, 'file') +const getFile = _.partial(baseItem.getItem, 'file'); -const listFiles = _.partial(baseItem.listItems, 'file') +const listFiles = _.partial(baseItem.listItems, 'file'); const createFile = (z, bundle) => { - const folder = bundle.inputData.folder || '' + const folder = bundle.inputData.folder || ''; // NOTE: `file` is really a URL like "https://zapier.com/engine/hydrate//.blahblahblah:blah:blah/" - const file = bundle.inputData.file + const file = bundle.inputData.file; return getFileDetailsFromRequest(file) .then((fileDetails) => { const name = - bundle.inputData.name || fileDetails.filename || 'unnamedfile.unknown' + bundle.inputData.name || fileDetails.filename || 'unnamedfile.unknown'; return baseItem.handleCreateWithSession( z, @@ -28,13 +28,13 @@ const createFile = (z, bundle) => { fileDetails.size, fileDetails.contentType, folder, - name - ) + name, + ); }) - .catch(handleError) -} + .catch(handleError); +}; -const searchFile = _.partial(baseItem.searchItem, 'file') +const searchFile = _.partial(baseItem.searchItem, 'file'); module.exports = { key: 'file', @@ -162,4 +162,4 @@ module.exports = { { key: 'webUrl', label: 'URL' }, { key: '@microsoft.graph.downloadUrl', label: 'Download URL' }, ], -} +}; diff --git a/example-apps/onedrive/resources/folder.js b/example-apps/onedrive/resources/folder.js index bb8c168ad..fe277c717 100644 --- a/example-apps/onedrive/resources/folder.js +++ b/example-apps/onedrive/resources/folder.js @@ -1,35 +1,35 @@ -'use strict' +'use strict'; -const _ = require('lodash') +const _ = require('lodash'); -const utils = require('../utils') -const parseResponse = utils.parseResponse -const handleError = utils.handleError -const cleanupPaths = utils.cleanupPaths -const extractParentsFromPath = utils.extractParentsFromPath -const { BASE_ITEM_URL } = require('../constants') -const baseItem = require('./base-item') +const utils = require('../utils'); +const parseResponse = utils.parseResponse; +const handleError = utils.handleError; +const cleanupPaths = utils.cleanupPaths; +const extractParentsFromPath = utils.extractParentsFromPath; +const { BASE_ITEM_URL } = require('../constants'); +const baseItem = require('./base-item'); -const getFolder = _.partial(baseItem.getItem, 'folder') +const getFolder = _.partial(baseItem.getItem, 'folder'); const listFolders = (z, bundle) => { return baseItem.listItems('folder', z, bundle).then((results) => { // Add parents when being called in the context of populating a dynamic dropdown (prefill). // This allows users to "navigate back" to previous dirs in the Zap Editor if (bundle.meta.prefill && bundle.inputData.folder) { - const parents = extractParentsFromPath(bundle.inputData.folder) - parents.forEach((result) => results.unshift(result)) + const parents = extractParentsFromPath(bundle.inputData.folder); + parents.forEach((result) => results.unshift(result)); } - return results - }) -} + return results; + }); +}; const createFolder = (z, bundle) => { - let folder = bundle.inputData.folder || '' + let folder = bundle.inputData.folder || ''; if (folder) { - folder = `:${encodeURIComponent(folder)}:` // OneDrive URI format + folder = `:${encodeURIComponent(folder)}:`; // OneDrive URI format } return z @@ -47,10 +47,10 @@ const createFolder = (z, bundle) => { }) .then(_.partial(parseResponse, z, 'folder')) .then(cleanupPaths) - .catch(handleError) -} + .catch(handleError); +}; -const searchFolder = _.partial(baseItem.searchItem, 'folder') +const searchFolder = _.partial(baseItem.searchItem, 'folder'); module.exports = { key: 'folder', @@ -167,4 +167,4 @@ module.exports = { { key: '_parent', label: 'Parent Folder' }, { key: 'webUrl', label: 'URL' }, ], -} +}; diff --git a/example-apps/onedrive/test/authentication.js b/example-apps/onedrive/test/authentication.js index fcef218af..946e654ae 100644 --- a/example-apps/onedrive/test/authentication.js +++ b/example-apps/onedrive/test/authentication.js @@ -1,51 +1,51 @@ -require('should') +require('should'); -const zapier = require('zapier-platform-core') +const zapier = require('zapier-platform-core'); -const testUtils = require('./test-utils') -const App = require('../index') -const appTester = zapier.createAppTester(App) +const testUtils = require('./test-utils'); +const App = require('../index'); +const appTester = zapier.createAppTester(App); describe('Authentication', () => { - before(testUtils.globalBeforeSetup) + before(testUtils.globalBeforeSetup); it('should refresh auth', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' - } - } + accountType: 'personal', + }, + }; appTester(App.authentication.oauth2Config.refreshAccessToken, bundle) .then((result) => { - result.should.have.property('access_token') - result.should.have.property('refresh_token') - done() + result.should.have.property('access_token'); + result.should.have.property('refresh_token'); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should test auth', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - accountType: 'personal' - } - } + accountType: 'personal', + }, + }; appTester(App.authentication.test, bundle) .then((result) => { - result.should.have.property('userPrincipalName') - done() + result.should.have.property('userPrincipalName'); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should generate an authorize URL', (done) => { const bundle = { @@ -55,21 +55,21 @@ describe('Authentication', () => { inputData: { state: '4444', redirect_uri: 'https://zapier.com/', - accountType: 'personal' + accountType: 'personal', }, environment: { CLIENT_ID: '1234', - CLIENT_SECRET: 'asdf' - } - } + CLIENT_SECRET: 'asdf', + }, + }; appTester(App.authentication.oauth2Config.authorizeUrl, bundle) .then((authorizeUrl) => { authorizeUrl.should.eql( - 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=1234&redirect_uri=http%3A%2F%2Fzapier.com%2F&response_type=code&state=4444' - ) - done() + 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=1234&redirect_uri=http%3A%2F%2Fzapier.com%2F&response_type=code&state=4444', + ); + done(); }) - .catch(done) - }) -}) + .catch(done); + }); +}); diff --git a/example-apps/onedrive/test/creates/text-file.js b/example-apps/onedrive/test/creates/text-file.js index 10910e46a..4cb88be23 100644 --- a/example-apps/onedrive/test/creates/text-file.js +++ b/example-apps/onedrive/test/creates/text-file.js @@ -1,112 +1,112 @@ -'use strict' +'use strict'; -require('should') +require('should'); -const zapier = require('zapier-platform-core') +const zapier = require('zapier-platform-core'); -const testUtils = require('../test-utils') -const App = require('../../index') -const appTester = zapier.createAppTester(App) +const testUtils = require('../test-utils'); +const App = require('../../index'); +const appTester = zapier.createAppTester(App); -const TEST_RESOURCES = testUtils.TEST_RESOURCES +const TEST_RESOURCES = testUtils.TEST_RESOURCES; describe('Create Text File', () => { - before(testUtils.globalBeforeSetup) + before(testUtils.globalBeforeSetup); it('should create a new text file in the root dir', (done) => { - const file = 'Sample content' - const name = `Test-${new Date().getTime()}` + const file = 'Sample content'; + const name = `Test-${new Date().getTime()}`; const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { folder: '', file, - name - } - } + name, + }, + }; appTester(App.creates.textFile.operation.perform, bundle) .then((result) => { - result.should.have.property('id') - result.should.have.property('file') - result.should.not.have.property('folder') - result.name.should.containEql(name) - result.name.should.containEql('.txt') - result.name.should.not.containEql('.txt.txt') - result._parent.should.eql('') - result._path.should.containEql(`/${name}`) - done() + result.should.have.property('id'); + result.should.have.property('file'); + result.should.not.have.property('folder'); + result.name.should.containEql(name); + result.name.should.containEql('.txt'); + result.name.should.not.containEql('.txt.txt'); + result._parent.should.eql(''); + result._path.should.containEql(`/${name}`); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should create a text file with a unicode name and contents', (done) => { - const file = 'Ohweeeeee®™¥¶‰÷!!!!!!!!!!!' - const name = `Test-ç€is-æ-${new Date().getTime()}.txt` + const file = 'Ohweeeeee®™¥¶‰÷!!!!!!!!!!!'; + const name = `Test-ç€is-æ-${new Date().getTime()}.txt`; const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { folder: TEST_RESOURCES.folder.path, name, - file - } - } + file, + }, + }; appTester(App.creates.textFile.operation.perform, bundle) .then((result) => { - result.should.have.property('id') - result.should.have.property('file') - result.should.not.have.property('folder') - result.name.should.containEql(name) - result.name.should.containEql('.txt') - result.name.should.not.containEql('.txt.txt') - result._parent.should.eql(TEST_RESOURCES.folder.parent) - result._path.should.containEql(`${TEST_RESOURCES.folder.path}/${name}`) - done() + result.should.have.property('id'); + result.should.have.property('file'); + result.should.not.have.property('folder'); + result.name.should.containEql(name); + result.name.should.containEql('.txt'); + result.name.should.not.containEql('.txt.txt'); + result._parent.should.eql(TEST_RESOURCES.folder.parent); + result._path.should.containEql(`${TEST_RESOURCES.folder.path}/${name}`); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should create a new text file in the root dir, renaming it, because another one exists', (done) => { - const file = 'Sample content' - const name = 'boom' + const file = 'Sample content'; + const name = 'boom'; const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { folder: '', file, - name - } - } + name, + }, + }; appTester(App.creates.textFile.operation.perform, bundle) .then((result) => { - result.should.have.property('id') - result.should.have.property('file') - result.should.not.have.property('folder') - result.name.should.containEql(`${name} `) - result.name.should.containEql('.txt') - result.name.should.not.containEql('.txt.txt') - result.name.should.not.containEql(`${name}.txt`) - result._parent.should.eql('') - result._path.should.containEql(`/${name} `) - done() + result.should.have.property('id'); + result.should.have.property('file'); + result.should.not.have.property('folder'); + result.name.should.containEql(`${name} `); + result.name.should.containEql('.txt'); + result.name.should.not.containEql('.txt.txt'); + result.name.should.not.containEql(`${name}.txt`); + result._parent.should.eql(''); + result._path.should.containEql(`/${name} `); + done(); }) - .catch(done) - }) -}) + .catch(done); + }); +}); diff --git a/example-apps/onedrive/test/hydrators.js b/example-apps/onedrive/test/hydrators.js index e9191ab7e..f9cce599b 100644 --- a/example-apps/onedrive/test/hydrators.js +++ b/example-apps/onedrive/test/hydrators.js @@ -1,47 +1,47 @@ -require('should') +require('should'); -const zapier = require('zapier-platform-core') +const zapier = require('zapier-platform-core'); -const testUtils = require('./test-utils') -const App = require('../index') -const appTester = zapier.createAppTester(App) +const testUtils = require('./test-utils'); +const App = require('../index'); +const appTester = zapier.createAppTester(App); -const TEST_RESOURCES = testUtils.TEST_RESOURCES +const TEST_RESOURCES = testUtils.TEST_RESOURCES; describe('Hydrators', () => { - before(testUtils.globalBeforeSetup) + before(testUtils.globalBeforeSetup); it('should get file contents', (done) => { const bundle = { authData: { - access_token: process.env.ACCESS_TOKEN + access_token: process.env.ACCESS_TOKEN, }, inputData: { - id: TEST_RESOURCES.root.id - } - } + id: TEST_RESOURCES.root.id, + }, + }; appTester(App.hydrators.getFileContents, bundle) .then((fileContents) => { - fileContents.length.should.above(0) - done() + fileContents.length.should.above(0); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should get unicode file contents', (done) => { // CODE TIP: Hydrating files often involves touching the raw bytes (and // handling the file names), so it's a good idea to test different edge cases - done() - }) + done(); + }); it('should not get file contents for big files', (done) => { // An example edge case that would be worth testing - done() - }) + done(); + }); it('should not get file contents for binary files', (done) => { // An example edge case that would be worth testing - done() - }) -}) + done(); + }); +}); diff --git a/example-apps/onedrive/test/resources/file.js b/example-apps/onedrive/test/resources/file.js index efbacba39..3c8fe85d4 100644 --- a/example-apps/onedrive/test/resources/file.js +++ b/example-apps/onedrive/test/resources/file.js @@ -1,132 +1,132 @@ -'use strict' +'use strict'; -require('should') +require('should'); -const zapier = require('zapier-platform-core') +const zapier = require('zapier-platform-core'); -const testUtils = require('../test-utils') -const App = require('../../index') -const appTester = zapier.createAppTester(App) +const testUtils = require('../test-utils'); +const App = require('../../index'); +const appTester = zapier.createAppTester(App); -const TEST_RESOURCES = testUtils.TEST_RESOURCES +const TEST_RESOURCES = testUtils.TEST_RESOURCES; describe('File Resource', () => { - before(testUtils.globalBeforeSetup) + before(testUtils.globalBeforeSetup); it('should get an existing file in the root folder', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - id: TEST_RESOURCES.root.id - } - } + id: TEST_RESOURCES.root.id, + }, + }; appTester(App.resources.file.get.operation.perform, bundle) .then((result) => { - result.should.have.property('id') - result.should.have.property('file') - result.should.not.have.property('folder') - result.name.should.eql(TEST_RESOURCES.root.name) - result._path.should.eql(TEST_RESOURCES.root.path) - result._parent.should.eql(TEST_RESOURCES.root.parent) - done() + result.should.have.property('id'); + result.should.have.property('file'); + result.should.not.have.property('folder'); + result.name.should.eql(TEST_RESOURCES.root.name); + result._path.should.eql(TEST_RESOURCES.root.path); + result._parent.should.eql(TEST_RESOURCES.root.parent); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should get an existing file in a child folder', (done) => { // An example scenario that could be worth testing if the HTTP request for // a child folder is sufficiently different from a root folder - done() - }) + done(); + }); it('should list files in root dir', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - folder: '' - } - } + folder: '', + }, + }; appTester(App.resources.file.list.operation.perform, bundle) .then((results) => { - results.length.should.above(0) + results.length.should.above(0); results.forEach((result) => { - result.should.have.property('id') - result.should.have.property('file') - result.should.not.have.property('folder') - }) - done() + result.should.have.property('id'); + result.should.have.property('file'); + result.should.not.have.property('folder'); + }); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should not miss any fields from the sample', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - folder: '' - } - } + folder: '', + }, + }; appTester(App.resources.file.list.operation.perform, bundle) .then((results) => { - results.length.should.above(0) + results.length.should.above(0); results.forEach((result) => { - result.should.have.property('id') - result.should.have.property('file') - result.should.not.have.property('folder') - }) - const file = results[0] - const sampleKeys = Object.keys(App.resources.file.sample) - sampleKeys.forEach((sampleKey) => file[sampleKey].should.eql(true)) - done() + result.should.have.property('id'); + result.should.have.property('file'); + result.should.not.have.property('folder'); + }); + const file = results[0]; + const sampleKeys = Object.keys(App.resources.file.sample); + sampleKeys.forEach((sampleKey) => file[sampleKey].should.eql(true)); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should upload a new file in the root dir', (done) => { const file = - 'https://cdn.zapier.com/storage/files/f6679cf77afeaf6b8426de8d7b9642fc.pdf' - const name = `Test-${new Date().getTime()}-ç€is-æ.pdf` + 'https://cdn.zapier.com/storage/files/f6679cf77afeaf6b8426de8d7b9642fc.pdf'; + const name = `Test-${new Date().getTime()}-ç€is-æ.pdf`; const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { folder: '', file, - name - } - } + name, + }, + }; appTester(App.resources.file.create.operation.perform, bundle) .then((result) => { - result.should.have.property('id') - result.should.have.property('file') - result.should.not.have.property('folder') - result.name.should.containEql(name) - result._parent.should.eql('') - result._path.should.containEql(`/${name}`) - done() + result.should.have.property('id'); + result.should.have.property('file'); + result.should.not.have.property('folder'); + result.name.should.containEql(name); + result._parent.should.eql(''); + result._path.should.containEql(`/${name}`); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should upload an utf8-named file', (done) => { // CODE TIP: It's a good idea to write multiple tests cases around creates @@ -135,52 +135,52 @@ describe('File Resource', () => { // * Records associated with the right relationships (i.e. a file in a folder, an owner of a lead) // * Critical defaults work as expected // * Dates & times are set correctly - done() - }) + done(); + }); it('should upload a new file in the root dir, renaming it, because another one exists', (done) => { // An example of an edge case where a naming collision in OneDrive could // cause an overwrite or an auto-renaming of the file, so we want to test // and make sure we get the behavior we want (auto-renaming) - done() - }) + done(); + }); it('should find a file in the root dir', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { folder: '', - name: 'sample' - } - } + name: 'sample', + }, + }; appTester(App.resources.file.search.operation.perform, bundle) .then((results) => { - results.length.should.above(0) - results[0].should.have.property('id') - results[0].should.have.property('file') - results[0].should.not.have.property('folder') - results[0].name.should.containEql('sample') - results[0]._parent.should.eql('') - results[0]._path.should.containEql('/sample') - done() + results.length.should.above(0); + results[0].should.have.property('id'); + results[0].should.have.property('file'); + results[0].should.not.have.property('folder'); + results[0].name.should.containEql('sample'); + results[0]._parent.should.eql(''); + results[0]._path.should.containEql('/sample'); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should find a file in a child dir', (done) => { // An example scenario that could be worth testing if the HTTP request for // a child folder is sufficiently different from a root folder - done() - }) + done(); + }); it('should find a unicode file in a child dir', (done) => { // CODE TIP: Like with creates, adding multiple tests around the common // edge cases of searching is a good idea - done() - }) -}) + done(); + }); +}); diff --git a/example-apps/onedrive/test/resources/folder.js b/example-apps/onedrive/test/resources/folder.js index e235c9cab..b18963882 100644 --- a/example-apps/onedrive/test/resources/folder.js +++ b/example-apps/onedrive/test/resources/folder.js @@ -1,76 +1,76 @@ -'use strict' +'use strict'; -require('should') +require('should'); -const zapier = require('zapier-platform-core') +const zapier = require('zapier-platform-core'); -const testUtils = require('../test-utils') -const App = require('../../index') -const appTester = zapier.createAppTester(App) +const testUtils = require('../test-utils'); +const App = require('../../index'); +const appTester = zapier.createAppTester(App); -const TEST_RESOURCES = testUtils.TEST_RESOURCES +const TEST_RESOURCES = testUtils.TEST_RESOURCES; describe('Folder Resource', () => { - before(testUtils.globalBeforeSetup) + before(testUtils.globalBeforeSetup); it('should get an existing root folder', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - id: TEST_RESOURCES.folder.id - } - } + id: TEST_RESOURCES.folder.id, + }, + }; appTester(App.resources.folder.get.operation.perform, bundle) .then((result) => { - result.should.have.property('id') - result.should.have.property('folder') - result.should.not.have.property('file') - result.name.should.eql(TEST_RESOURCES.root.name) - result._path.should.eql(TEST_RESOURCES.root.path) - result._parent.should.eql(TEST_RESOURCES.root.parent) - done() + result.should.have.property('id'); + result.should.have.property('folder'); + result.should.not.have.property('file'); + result.name.should.eql(TEST_RESOURCES.root.name); + result._path.should.eql(TEST_RESOURCES.root.path); + result._parent.should.eql(TEST_RESOURCES.root.parent); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should get an existing child folder', (done) => { // An example scenario that could be worth testing if the HTTP request for // a child folder is sufficiently different from a root folder - done() - }) + done(); + }); it('should list folders in root dir', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - folder: '' + folder: '', }, meta: { - prefill: false - } - } + prefill: false, + }, + }; appTester(App.resources.folder.list.operation.perform, bundle) .then((results) => { - results.length.should.above(0) + results.length.should.above(0); results.forEach((result) => { - result.should.have.property('id') - result.should.have.property('folder') - result.should.not.have.property('file') - }) - done() + result.should.have.property('id'); + result.should.have.property('folder'); + result.should.not.have.property('file'); + }); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should list folders without parents on no prefill', (done) => { // CODE TIP: When reusing a list operation to power a trigger and a @@ -80,168 +80,168 @@ describe('Folder Resource', () => { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - folder: TEST_RESOURCES.childFolder.path + folder: TEST_RESOURCES.childFolder.path, }, meta: { - prefill: false - } - } + prefill: false, + }, + }; appTester(App.resources.folder.list.operation.perform, bundle) .then((results) => { - results.length.should.above(0) + results.length.should.above(0); - let foundParents = false + let foundParents = false; results.forEach((result) => { - result.should.have.property('id') - result.should.have.property('folder') - result.should.not.have.property('file') + result.should.have.property('id'); + result.should.have.property('folder'); + result.should.not.have.property('file'); if (result.id < 0) { - foundParents = true + foundParents = true; } - }) + }); - foundParents.should.eql(false) - done() + foundParents.should.eql(false); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should list folders with parents on prefill', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - folder: TEST_RESOURCES.childFolder.path + folder: TEST_RESOURCES.childFolder.path, }, meta: { - prefill: true - } - } + prefill: true, + }, + }; appTester(App.resources.folder.list.operation.perform, bundle) .then((results) => { - results.length.should.above(0) + results.length.should.above(0); - let foundParents = false + let foundParents = false; results.forEach((result) => { - result.should.have.property('id') - result.should.have.property('folder') - result.should.not.have.property('file') + result.should.have.property('id'); + result.should.have.property('folder'); + result.should.not.have.property('file'); if (result.id < 0) { - foundParents = true + foundParents = true; } - }) + }); - foundParents.should.eql(true) - done() + foundParents.should.eql(true); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should not miss any fields from the sample', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { - folder: '' + folder: '', }, meta: { - prefill: false - } - } + prefill: false, + }, + }; appTester(App.resources.folder.list.operation.perform, bundle) .then((results) => { - results.length.should.above(0) + results.length.should.above(0); results.forEach((result) => { - result.should.have.property('id') - result.should.have.property('folder') - result.should.not.have.property('file') - }) - const folder = results[0] - const sampleKeys = Object.keys(App.resources.folder.sample) - sampleKeys.forEach((sampleKey) => folder[sampleKey].should.eql(true)) - done() + result.should.have.property('id'); + result.should.have.property('folder'); + result.should.not.have.property('file'); + }); + const folder = results[0]; + const sampleKeys = Object.keys(App.resources.folder.sample); + sampleKeys.forEach((sampleKey) => folder[sampleKey].should.eql(true)); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should create a new folder in the root dir', (done) => { - const name = `Test-${new Date().getTime()}` + const name = `Test-${new Date().getTime()}`; const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { folder: '', - name - } - } + name, + }, + }; appTester(App.resources.folder.create.operation.perform, bundle) .then((result) => { - result.should.have.property('id') - result.should.have.property('folder') - result.should.not.have.property('file') - result.name.should.containEql(name) - result._parent.should.eql('') - result._path.should.containEql(`/${name}`) - done() + result.should.have.property('id'); + result.should.have.property('folder'); + result.should.not.have.property('file'); + result.name.should.containEql(name); + result._parent.should.eql(''); + result._path.should.containEql(`/${name}`); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should create a new folder in a child dir', (done) => { // An example scenario that could be worth testing if the HTTP request for // a child folder is sufficiently different from a root folder - done() - }) + done(); + }); it('should find a folder in the root dir', (done) => { const bundle = { authData: { access_token: process.env.ACCESS_TOKEN, refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' + accountType: 'personal', }, inputData: { folder: '', - name: 'Documents' - } - } + name: 'Documents', + }, + }; appTester(App.resources.folder.search.operation.perform, bundle) .then((results) => { - results.length.should.above(0) - results[0].should.have.property('id') - results[0].should.have.property('folder') - results[0].should.not.have.property('file') - results[0].name.should.containEql('Documents') - results[0]._parent.should.eql('') - results[0]._path.should.containEql('/Documents') - done() + results.length.should.above(0); + results[0].should.have.property('id'); + results[0].should.have.property('folder'); + results[0].should.not.have.property('file'); + results[0].name.should.containEql('Documents'); + results[0]._parent.should.eql(''); + results[0]._path.should.containEql('/Documents'); + done(); }) - .catch(done) - }) + .catch(done); + }); it('should find a folder in a child dir', (done) => { // An example scenario that could be worth testing if the HTTP request for // a child folder is sufficiently different from a root folder - done() - }) -}) + done(); + }); +}); diff --git a/example-apps/onedrive/test/test-utils.js b/example-apps/onedrive/test/test-utils.js index 916131490..9efad1e24 100644 --- a/example-apps/onedrive/test/test-utils.js +++ b/example-apps/onedrive/test/test-utils.js @@ -1,14 +1,14 @@ -'use strict' +'use strict'; -require('should') +require('should'); -const zapier = require('zapier-platform-core') +const zapier = require('zapier-platform-core'); -const App = require('../index') -const appTester = zapier.createAppTester(App) +const App = require('../index'); +const appTester = zapier.createAppTester(App); const globalBeforeSetup = (done) => { - zapier.tools.env.inject() + zapier.tools.env.inject(); if ( !process.env.CLIENT_ID || @@ -16,8 +16,8 @@ const globalBeforeSetup = (done) => { !process.env.REFRESH_TOKEN ) { throw new Error( - 'Setup your .environment file (or use `export`) according to the README.' - ) + 'Setup your .environment file (or use `export`) according to the README.', + ); } // ACCESS_TOKEN expires very quickly, so we get a new one per test run from REFRESH_TOKEN @@ -26,22 +26,22 @@ const globalBeforeSetup = (done) => { authData: { access_token: '', refresh_token: process.env.REFRESH_TOKEN, - accountType: 'personal' - } - } + accountType: 'personal', + }, + }; appTester(App.authentication.oauth2Config.refreshAccessToken, bundle) .then((result) => { - result.should.have.property('access_token') - result.should.have.property('refresh_token') - process.env.ACCESS_TOKEN = result.access_token - done() + result.should.have.property('access_token'); + result.should.have.property('refresh_token'); + process.env.ACCESS_TOKEN = result.access_token; + done(); }) - .catch(done) + .catch(done); } else { - done() + done(); } -} +}; // Below is a set of files the app can use to test different scenarios. // To make the test suite run, add files to your account in the given folders, @@ -54,30 +54,30 @@ const TEST_RESOURCES = { id: '', name: 'sample.pdf', path: '/sample.pdf', - parent: '' + parent: '', }, nested: { id: '', name: 'test.txt', path: '/Documents/Testing/test.txt', - parent: '/Documents/Testing' + parent: '/Documents/Testing', }, folder: { id: '', name: 'Documents', path: '/Documents', - parent: '' + parent: '', }, childFolder: { id: '', name: 'Testing', path: '/Documents/Testing', - parent: '/Documents' - } -} + parent: '/Documents', + }, +}; module.exports = { globalBeforeSetup, - TEST_RESOURCES -} + TEST_RESOURCES, +}; diff --git a/example-apps/onedrive/test/utils.js b/example-apps/onedrive/test/utils.js index b78ac1148..8de8a5116 100644 --- a/example-apps/onedrive/test/utils.js +++ b/example-apps/onedrive/test/utils.js @@ -1,68 +1,68 @@ -'use strict' +'use strict'; -require('should') +require('should'); -const utils = require('../utils') -const extractParentsFromPath = utils.extractParentsFromPath -const getStringByteSize = utils.getStringByteSize +const utils = require('../utils'); +const extractParentsFromPath = utils.extractParentsFromPath; +const getStringByteSize = utils.getStringByteSize; describe('Utils', () => { it('should extract parents from a folder path', () => { - let parents = extractParentsFromPath('/Some/Kind of /Test') + let parents = extractParentsFromPath('/Some/Kind of /Test'); - parents.length.should.eql(3) + parents.length.should.eql(3); - parents[0].id.should.eql(-1) - parents[0].name.should.eql('/') - parents[0]._path.should.eql('') - parents[0].should.have.property('folder') - parents[0].should.not.have.property('file') + parents[0].id.should.eql(-1); + parents[0].name.should.eql('/'); + parents[0]._path.should.eql(''); + parents[0].should.have.property('folder'); + parents[0].should.not.have.property('file'); - parents[1].id.should.eql(-2) - parents[1].name.should.eql('Some') - parents[1]._path.should.eql('/Some') - parents[1].should.have.property('folder') - parents[1].should.not.have.property('file') + parents[1].id.should.eql(-2); + parents[1].name.should.eql('Some'); + parents[1]._path.should.eql('/Some'); + parents[1].should.have.property('folder'); + parents[1].should.not.have.property('file'); - parents[2].id.should.eql(-3) - parents[2].name.should.eql('Kind of ') - parents[2]._path.should.eql('/Some/Kind of ') - parents[2].should.have.property('folder') - parents[2].should.not.have.property('file') + parents[2].id.should.eql(-3); + parents[2].name.should.eql('Kind of '); + parents[2]._path.should.eql('/Some/Kind of '); + parents[2].should.have.property('folder'); + parents[2].should.not.have.property('file'); - parents = extractParentsFromPath('/Zapier') + parents = extractParentsFromPath('/Zapier'); - parents.length.should.eql(1) + parents.length.should.eql(1); - parents[0].id.should.eql(-1) - parents[0].name.should.eql('/') - parents[0]._path.should.eql('') - parents[0].should.have.property('folder') - parents[0].should.not.have.property('file') - }) + parents[0].id.should.eql(-1); + parents[0].name.should.eql('/'); + parents[0]._path.should.eql(''); + parents[0].should.have.property('folder'); + parents[0].should.not.have.property('file'); + }); it('should correctly compute the byte size of strings', () => { const tests = [ { string: 'asd', - expected: 3 + expected: 3, }, { string: '@€£¶‰dfg', - expected: 14 + expected: 14, }, { string: '÷¶[]÷d()ß-°ú', - expected: 18 + expected: 18, }, { string: 'ç€is-æ', - expected: 10 - } - ] + expected: 10, + }, + ]; tests.forEach((test) => - getStringByteSize(test.string).should.eql(test.expected) - ) - }) -}) + getStringByteSize(test.string).should.eql(test.expected), + ); + }); +}); diff --git a/example-apps/onedrive/utils.js b/example-apps/onedrive/utils.js index 16d4a88af..c34d95a3b 100644 --- a/example-apps/onedrive/utils.js +++ b/example-apps/onedrive/utils.js @@ -1,74 +1,74 @@ -'use strict' +'use strict'; -const _ = require('lodash') -const fetch = require('node-fetch') -const contentDisposition = require('content-disposition') +const _ = require('lodash'); +const fetch = require('node-fetch'); +const contentDisposition = require('content-disposition'); // CODE TIP: This function is used to process the response of several endpoints // on the OneDrive API. We intentionally don't set it up as an `afterResposne` // handler because not *all* calls need it (i.e. the auth test and file create), // so we break it out and share the code this way instead. const parseResponse = (z, type, response) => { - let results = [] + let results = []; if (response.status >= 200 && response.status < 300) { - results = response.data + results = response.data; // OneDrive puts the contents of lists inside .value property if (!_.isArray(results) && _.isArray(results.value)) { - results = results.value + results = results.value; } } else { - throw new z.errors.Error(response.content, null, response.status) + throw new z.errors.Error(response.content, null, response.status); } // Only return files or folders, according to type if (_.isArray(results)) { - results = results.filter((result) => result[type]) + results = results.filter((result) => result[type]); } else { if (!results[type]) { - results = {} + results = {}; } } - return results -} + return results; +}; const handleError = (error) => { if (typeof error === 'string') { - throw new Error(error) + throw new Error(error); } - throw error -} + throw error; +}; const extractParentsFromPath = (path) => { - const parts = path.split('/') - const results = [] + const parts = path.split('/'); + const results = []; - parts.splice(parts.length - 1) // Last is the current directory, so we remove it + parts.splice(parts.length - 1); // Last is the current directory, so we remove it - let i = parts.length - 1 + let i = parts.length - 1; while (parts.length > 0) { - const name = parts.splice(i)[0] + const name = parts.splice(i)[0]; const result = { id: (i + 1) * -1, name: name === '' ? '/' : name, _path: parts.join('/') + (name === '' ? name : `/${name}`), folder: {}, - } + }; - results.push(result) + results.push(result); - i -= 1 + i -= 1; } - results.reverse() + results.reverse(); - return results -} + return results; +}; // UX TIP: Sometimes it can be helpful to translate raw values from an API into // terms that end users are familiar with. In this example, OneDrive returns @@ -79,22 +79,22 @@ const cleanupPaths = (results) => { if (!_.isArray(results)) { results._parent = _.get(results, 'parentReference.path', '').replace( '/drive/root:', - '' - ) - results._path = `${results._parent}/${results.name}` - return results + '', + ); + results._path = `${results._parent}/${results.name}`; + return results; } // Adds easier to reference paths, cleaning up the "/drive/root:" clutter return results.map((result) => { result._parent = _.get(result, 'parentReference.path', '').replace( '/drive/root:', - '' - ) - result._path = `${result._parent}/${result.name}` - return result - }) -} + '', + ); + result._path = `${result._parent}/${result.name}`; + return result; + }); +}; const getFileDetailsFromRequest = (url) => new Promise((resolve, reject) => { @@ -103,31 +103,30 @@ const getFileDetailsFromRequest = (url) => size: 0, content: '', contentType: '', - } + }; fetch(url) .then((response) => { - fileDetails.size = response.headers.get('content-length') - fileDetails.contentType = response.headers.get('content-type') - const disposition = response.headers.get('content-disposition') + fileDetails.size = response.headers.get('content-length'); + fileDetails.contentType = response.headers.get('content-type'); + const disposition = response.headers.get('content-disposition'); if (disposition) { - fileDetails.filename = contentDisposition.parse( - disposition - ).parameters.filename + fileDetails.filename = + contentDisposition.parse(disposition).parameters.filename; } - return response.buffer() + return response.buffer(); }) .then((content) => { - fileDetails.content = content + fileDetails.content = content; - return resolve(fileDetails) + return resolve(fileDetails); }) - .catch(reject) - }) + .catch(reject); + }); -const getStringByteSize = (string) => Buffer.byteLength(string, 'utf8') +const getStringByteSize = (string) => Buffer.byteLength(string, 'utf8'); module.exports = { parseResponse, @@ -136,4 +135,4 @@ module.exports = { cleanupPaths, getFileDetailsFromRequest, getStringByteSize, -} +}; diff --git a/example-apps/resource/index.js b/example-apps/resource/index.js index f3c3b2756..533994736 100644 --- a/example-apps/resource/index.js +++ b/example-apps/resource/index.js @@ -19,7 +19,7 @@ const App = { // If you want your resource to show up, you better include it here! resources: { - [Recipe.key]: Recipe + [Recipe.key]: Recipe, }, // If you want your trigger to show up, you better include it here! @@ -29,7 +29,7 @@ const App = { searches: {}, // If you want your creates to show up, you better include it here! - creates: {} + creates: {}, }; // Finally, export the app. diff --git a/example-apps/resource/test/resources/recipe.js b/example-apps/resource/test/resources/recipe.js index 30d1b9ec7..d891b8f30 100644 --- a/example-apps/resource/test/resources/recipe.js +++ b/example-apps/resource/test/resources/recipe.js @@ -8,15 +8,15 @@ const App = require('../../index'); const appTester = zapier.createAppTester(App); describe('recipe resource', () => { - it('should get an existing recipe', done => { + it('should get an existing recipe', (done) => { const bundle = { inputData: { - id: 1 - } + id: 1, + }, }; appTester(App.resources.recipe.get.operation.perform, bundle) - .then(results => { + .then((results) => { results.name.should.eql('name 1'); results.directions.should.eql('directions 1'); done(); @@ -24,15 +24,15 @@ describe('recipe resource', () => { .catch(done); }); - it('should list existing recipes', done => { + it('should list existing recipes', (done) => { const bundle = { inputData: { - style: 'style 2' - } + style: 'style 2', + }, }; appTester(App.resources.recipe.list.operation.perform, bundle) - .then(results => { + .then((results) => { results.length.should.above(0); const firstRecipe = results[0]; @@ -43,32 +43,32 @@ describe('recipe resource', () => { .catch(done); }); - it('should create a new recipe', done => { + it('should create a new recipe', (done) => { const bundle = { inputData: { name: 'Smith Family Recipe', directions: '1. Order out :)', - authorId: 1 - } + authorId: 1, + }, }; appTester(App.resources.recipe.create.operation.perform, bundle) - .then(results => { + .then((results) => { results.should.have.property('name'); done(); }) .catch(done); }); - it('should find a recipe', done => { + it('should find a recipe', (done) => { const bundle = { inputData: { - name: 'Smith Family Recipe' - } + name: 'Smith Family Recipe', + }, }; appTester(App.resources.recipe.search.operation.perform, bundle) - .then(results => { + .then((results) => { results[0].should.have.property('name'); done(); }) diff --git a/example-apps/rest-hooks/index.js b/example-apps/rest-hooks/index.js index e8b9756f4..a881da07b 100644 --- a/example-apps/rest-hooks/index.js +++ b/example-apps/rest-hooks/index.js @@ -15,14 +15,14 @@ const App = { // If you want your trigger to show up, you better include it here! triggers: { - [recipe.key]: recipe + [recipe.key]: recipe, }, // If you want your searches to show up, you better include it here! searches: {}, // If you want your creates to show up, you better include it here! - creates: {} + creates: {}, }; // Finally, export the app. diff --git a/example-apps/rest-hooks/test/triggers.js b/example-apps/rest-hooks/test/triggers.js index b9f880cc9..e4e83032b 100644 --- a/example-apps/rest-hooks/test/triggers.js +++ b/example-apps/rest-hooks/test/triggers.js @@ -9,20 +9,20 @@ const appTester = zapier.createAppTester(App); describe('triggers', () => { describe('new recipe trigger', () => { - it('should load recipe from fake hook', done => { + it('should load recipe from fake hook', (done) => { const bundle = { inputData: { - style: 'mediterranean' + style: 'mediterranean', }, cleanedRequest: { id: 1, name: 'name 1', - directions: 'directions 1' - } + directions: 'directions 1', + }, }; appTester(App.triggers.recipe.operation.perform, bundle) - .then(results => { + .then((results) => { results.length.should.eql(1); const firstRecipe = results[0]; @@ -34,18 +34,18 @@ describe('triggers', () => { .catch(done); }); - it('should load recipe from list', done => { + it('should load recipe from list', (done) => { const bundle = { inputData: { - style: 'mediterranean' + style: 'mediterranean', }, meta: { - frontend: true - } + frontend: true, + }, }; appTester(App.triggers.recipe.operation.performList, bundle) - .then(results => { + .then((results) => { results.length.should.be.greaterThan(1); const firstRecipe = results[0]; diff --git a/example-apps/search-or-create/test/creates.test.js b/example-apps/search-or-create/test/creates.test.js index 505380a99..4a6557cba 100644 --- a/example-apps/search-or-create/test/creates.test.js +++ b/example-apps/search-or-create/test/creates.test.js @@ -11,7 +11,7 @@ describe('recipe', () => { const bundle = { inputData: { name: 'Pancake' } }; const result = await appTester( App.creates.recipe.operation.perform, - bundle + bundle, ); expect(result.id).toBeTruthy(); expect(result.name).toBe('Pancake'); diff --git a/example-apps/search-or-create/test/searches.test.js b/example-apps/search-or-create/test/searches.test.js index b502c8a34..3d1f445e2 100644 --- a/example-apps/search-or-create/test/searches.test.js +++ b/example-apps/search-or-create/test/searches.test.js @@ -11,7 +11,7 @@ describe('recipe', () => { const bundle = { inputData: { name: 'name 1' } }; const results = await appTester( App.searches.recipe.operation.perform, - bundle + bundle, ); expect(results.length).toBeGreaterThan(0); diff --git a/example-apps/search/index.js b/example-apps/search/index.js index 3e49a7100..20cd8a6d6 100644 --- a/example-apps/search/index.js +++ b/example-apps/search/index.js @@ -24,11 +24,11 @@ const App = { // If you want your searches to show up, you better include it here! searches: { - [search.key]: search + [search.key]: search, }, // If you want your creates to show up, you better include it here! - creates: {} + creates: {}, }; // Finally, export the app. diff --git a/example-apps/search/test/searches.js b/example-apps/search/test/searches.js index afab374c6..6a246f308 100644 --- a/example-apps/search/test/searches.js +++ b/example-apps/search/test/searches.js @@ -9,15 +9,15 @@ const appTester = zapier.createAppTester(App); describe('searches', () => { describe('search recipe', () => { - it('should find a recipe', done => { + it('should find a recipe', (done) => { const bundle = { inputData: { - style: 'style 2' - } + style: 'style 2', + }, }; appTester(App.searches.recipe.operation.perform, bundle) - .then(results => { + .then((results) => { results.length.should.be.aboveOrEqual(1); const firstRecipe = results[0]; diff --git a/example-apps/session-auth/test/authentication.test.js b/example-apps/session-auth/test/authentication.test.js index 8359c0572..d006c354b 100644 --- a/example-apps/session-auth/test/authentication.test.js +++ b/example-apps/session-auth/test/authentication.test.js @@ -16,7 +16,7 @@ describe('session auth app', () => { const newAuthData = await appTester( App.authentication.sessionConfig.perform, - bundle + bundle, ); expect(newAuthData.sessionKey).toBe('secret'); diff --git a/example-apps/trigger/index.js b/example-apps/trigger/index.js index cd16d4067..92421461d 100644 --- a/example-apps/trigger/index.js +++ b/example-apps/trigger/index.js @@ -21,14 +21,14 @@ const App = { // If you want your trigger to show up, you better include it here! triggers: { - [recipe.key]: recipe + [recipe.key]: recipe, }, // If you want your searches to show up, you better include it here! searches: {}, // If you want your creates to show up, you better include it here! - creates: {} + creates: {}, }; // Finally, export the app. diff --git a/example-apps/trigger/test/triggers.js b/example-apps/trigger/test/triggers.js index 014a2c601..936945d93 100644 --- a/example-apps/trigger/test/triggers.js +++ b/example-apps/trigger/test/triggers.js @@ -18,7 +18,7 @@ describe('triggers', () => { const results = await appTester( App.triggers.recipe.operation.perform, - bundle + bundle, ); results.length.should.above(0); @@ -33,7 +33,7 @@ describe('triggers', () => { const results = await appTester( App.triggers.recipe.operation.perform, - bundle + bundle, ); results.length.should.above(1); diff --git a/package.json b/package.json index 7c6cf24bc..16171e013 100644 --- a/package.json +++ b/package.json @@ -2,22 +2,24 @@ "name": "root", "private": true, "devDependencies": { + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.16.0", "chalk": "^4.1.1", "cross-env": "^7.0.3", - "eslint": "^8.32.0", - "eslint-config-prettier": "^8.6.0", + "eslint": "^9.16.0", + "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-mocha": "^9.0.0", - "eslint-plugin-n": "^15.6.1", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-standard": "^5.0.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-mocha": "^10.5.0", + "eslint-plugin-n": "^17.14.0", + "eslint-plugin-promise": "^7.2.1", + "globals": "^15.13.0", "husky": "^9.1.7", "inquirer": "^8.0.0", "lerna": "^8.0.2", "lint-staged": "^11.2.6", "mocha": "^11.0.1", - "prettier": "^2.8.3", + "prettier": "^3.4.1", "semver": "^7.3.8", "should": "^13" }, @@ -46,7 +48,7 @@ "eslint --fix --quiet" ], "*.{js,json}": [ - "prettier --write" + "prettier --write --ignore-path=.prettierignore" ] }, "prettier": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 7ebf0648e..11556df9f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -19,7 +19,7 @@ "/oclif.manifest.json" ], "engines": { - "node": ">=18" + "node": ">=18.18" }, "scripts": { "docs": "ZAPIER_BASE_ENDPOINT='' node scripts/docs.js", @@ -69,7 +69,7 @@ "open": "10.1.0", "ora": "5.4.0", "parse-gitignore": "0.5.1", - "prettier": "2.8.8", + "prettier": "3.4.1", "read": "4.0.0", "semver": "7.6.3", "string-length": "4.0.2", diff --git a/packages/cli/scripts/docs.js b/packages/cli/scripts/docs.js index cb57c896e..7b6811b03 100644 --- a/packages/cli/scripts/docs.js +++ b/packages/cli/scripts/docs.js @@ -40,7 +40,7 @@ ${'```'} # Commands ${docs} -` +`, ); }; diff --git a/packages/cli/scripts/set-app-template-versions.js b/packages/cli/scripts/set-app-template-versions.js index 4fd713fc5..9b6968e4e 100755 --- a/packages/cli/scripts/set-app-template-versions.js +++ b/packages/cli/scripts/set-app-template-versions.js @@ -56,7 +56,7 @@ const setVersion = (template, rootTmpDir) => { packagesVersions = `${newVersions.nodeVersion}, ${newVersions.npmVersion}, and ${newVersions.coreVersion}`; console.log( - `Setting versions of ${PACKAGES_NAMES} to ${packagesVersions} respectively in ${template} app template.` + `Setting versions of ${PACKAGES_NAMES} to ${packagesVersions} respectively in ${template} app template.`, ); console.log(`cloning ${cloneUrl}\n`); @@ -64,13 +64,13 @@ const setVersion = (template, rootTmpDir) => { .then(() => { const packageJsonFile = path.resolve( rootTmpDir, - `${repoName}/package.json` + `${repoName}/package.json`, ); const packageJson = require(packageJsonFile); const travisYamlFile = path.resolve( rootTmpDir, - `${repoName}/.travis.yml` + `${repoName}/.travis.yml`, ); const travisYaml = yaml.load(travisYamlFile); @@ -107,19 +107,19 @@ const setVersion = (template, rootTmpDir) => { .then((result) => { if (result === 'skip') { console.log( - `${template} is already set to ${packagesVersions} for ${PACKAGES_NAMES} respectively, skipping` + `${template} is already set to ${packagesVersions} for ${PACKAGES_NAMES} respectively, skipping`, ); return 'skip'; } console.log( - `Set ${PACKAGES_NAMES} versions to ${packagesVersions} respectively on app template ${template} successfully.` + `Set ${PACKAGES_NAMES} versions to ${packagesVersions} respectively on app template ${template} successfully.`, ); return null; }) .catch((err) => { console.error( `Error setting ${PACKAGES_NAMES} versions for app template ${template}:`, - err + err, ); return template; }); @@ -130,13 +130,13 @@ fse.removeSync(rootTmpDir); fse.ensureDirSync(rootTmpDir); const tasks = _.map(appTemplates, (template) => - setVersion(template, rootTmpDir) + setVersion(template, rootTmpDir), ); Promise.all(tasks).then((results) => { const failures = _.filter( results, - (result) => result !== null && result !== 'skip' + (result) => result !== null && result !== 'skip', ); const skipped = _.filter(results, (result) => result === 'skip'); const successCount = tasks.length - failures.length - skipped.length; @@ -144,17 +144,17 @@ Promise.all(tasks).then((results) => { if (failures.length) { console.error( `failed to set ${PACKAGES_NAMES} versions on these templates:`, - failures.join(', ') + failures.join(', '), ); } if (skipped.length) { console.log( - `skipped ${skipped.length} templates because versions for ${PACKAGES_NAMES} were already set to ${packagesVersions} respectively` + `skipped ${skipped.length} templates because versions for ${PACKAGES_NAMES} were already set to ${packagesVersions} respectively`, ); } if (successCount) { console.log( - `Successfully updated versions in ${successCount} app templates` + `Successfully updated versions in ${successCount} app templates`, ); } }); diff --git a/packages/cli/scripts/validate-app-templates.js b/packages/cli/scripts/validate-app-templates.js index 50281472c..320dea6d9 100755 --- a/packages/cli/scripts/validate-app-templates.js +++ b/packages/cli/scripts/validate-app-templates.js @@ -18,7 +18,7 @@ const validateAppTemplate = (template, rootTmpDir) => { const logStream = fse.createWriteStream(logFile); console.log( - `Validating ${template} app template, writing logs to ${logFile}` + `Validating ${template} app template, writing logs to ${logFile}`, ); return fse .ensureFile(logFile) @@ -53,7 +53,7 @@ fse.removeSync(rootTmpDir); fse.ensureDirSync(rootTmpDir); const tasks = _.map(appTemplates, (template) => - validateAppTemplate(template, rootTmpDir) + validateAppTemplate(template, rootTmpDir), ); Promise.all(tasks).then((results) => { @@ -61,7 +61,7 @@ Promise.all(tasks).then((results) => { if (failures.length) { console.error( 'these app templates failed to validate:', - failures.join(', ') + failures.join(', '), ); } else { console.log('app templates validated successfully'); diff --git a/packages/cli/src/generators/index.js b/packages/cli/src/generators/index.js index 4a8dfe9b8..e205aacf0 100644 --- a/packages/cli/src/generators/index.js +++ b/packages/cli/src/generators/index.js @@ -13,14 +13,14 @@ const writeGenericReadme = (gen) => { gen.fs.copyTpl( gen.templatePath('README.template.md'), gen.destinationPath('README.md'), - { name: gen.options.packageName } + { name: gen.options.packageName }, ); }; const appendReadme = (gen) => { const content = gen.fs.read( gen.templatePath(gen.options.template, 'README.md'), - { defaults: '' } + { defaults: '' }, ); if (content) { gen.fs.append(gen.destinationPath('README.md'), '\n' + content); @@ -51,8 +51,8 @@ const writeGenericPackageJson = (gen, packageJsonExtension) => { }, private: true, }, - packageJsonExtension - ) + packageJsonExtension, + ), ); }; @@ -76,8 +76,8 @@ const writeTypeScriptPackageJson = (gen, packageJsonExtension) => { }, private: true, }, - packageJsonExtension - ) + packageJsonExtension, + ), ); }; @@ -85,7 +85,7 @@ const writeGenericIndex = (gen, hasAuth) => { gen.fs.copyTpl( gen.templatePath('index.template.js'), gen.destinationPath('index.js'), - { corePackageName: PLATFORM_PACKAGE, hasAuth } + { corePackageName: PLATFORM_PACKAGE, hasAuth }, ); }; @@ -108,14 +108,14 @@ const writeGenericAuthTest = (gen) => { const authType = authTypes[gen.options.template]; gen.fs.copyTpl( gen.templatePath(`authTests/${authType || 'generic'}.test.js`), - gen.destinationPath('test/authentication.test.js') + gen.destinationPath('test/authentication.test.js'), ); }; const writeGenericTest = (gen) => { gen.fs.copyTpl( gen.templatePath('authTests/generic.test.js'), - gen.destinationPath('test/example.test.js') + gen.destinationPath('test/example.test.js'), ); }; @@ -158,7 +158,7 @@ const writeForStandaloneTemplate = (gen) => { gen.fs.copy( gen.templatePath(gen.options.template, '**', '*.{js,json,ts}'), - gen.destinationPath() + gen.destinationPath(), ); }; @@ -187,7 +187,7 @@ const writeForStandaloneTypeScriptTemplate = (gen) => { gen.fs.copy( gen.templatePath(gen.options.template, '**', '*.{js,json,ts}'), - gen.destinationPath() + gen.destinationPath(), ); }; diff --git a/packages/cli/src/oclif/ZapierBaseCommand.js b/packages/cli/src/oclif/ZapierBaseCommand.js index e676fe63d..cae912ab1 100644 --- a/packages/cli/src/oclif/ZapierBaseCommand.js +++ b/packages/cli/src/oclif/ZapierBaseCommand.js @@ -45,7 +45,7 @@ class ZapierBaseCommand extends Command { if (!this.flags.debug && !this.flags.invokedFromAnotherCommand) { errTextLines.push( - colors.gray('re-run this command with `--debug` for more info') + colors.gray('re-run this command with `--debug` for more info'), ); } @@ -92,7 +92,7 @@ class ZapierBaseCommand extends Command { throwForInvalidVersion(version) { if (!version.match(/^\d+\.\d+\.\d+$/g)) { throw new Error( - `${version} is an invalid version str. Try something like \`1.2.3\`` + `${version} is an invalid version str. Try something like \`1.2.3\``, ); } } @@ -303,14 +303,14 @@ class ZapierBaseCommand extends Command { ? ` Defaults to \`${flagValue.default}\`.` : '' } - `.trim() + `.trim(), ) .filter(Boolean); const descriptionParts = this.description.split('\n\n').filter(Boolean); const blurb = descriptionParts[0]; const lengthyDescription = colors.stripColors( - descriptionParts.length > 1 ? descriptionParts.slice(1).join('\n\n') : '' + descriptionParts.length > 1 ? descriptionParts.slice(1).join('\n\n') : '', ); return [ diff --git a/packages/cli/src/oclif/commands/analytics.js b/packages/cli/src/oclif/commands/analytics.js index 3884edd8e..242197e62 100644 --- a/packages/cli/src/oclif/commands/analytics.js +++ b/packages/cli/src/oclif/commands/analytics.js @@ -13,8 +13,8 @@ class AnalyticsCommand extends BaseCommand { const currentMode = await currentAnalyticsMode(); this.log( `The current analytics mode is ${colors.cyan( - currentMode - )}. Analytics may be skipped anyway if you've got DISABLE_ZAPIER_ANALYTICS set to a truthy value.` + currentMode, + )}. Analytics may be skipped anyway if you've got DISABLE_ZAPIER_ANALYTICS set to a truthy value.`, ); if (this.flags.mode) { @@ -23,8 +23,8 @@ class AnalyticsCommand extends BaseCommand { } else { this.log( `You can see what data is sent by running \`${colors.yellow( - 'DEBUG=zapier:analytics zapier someCommand' - )}\`.\n\nYou can change your analytics preferences by re-running this command with the \`--mode\` flag.\n\nThe data collected is as generic as we can make it while still getting useful input. No specific information about your filesystem is collected. Your Zapier user id is collected so that we can better debug issues. We will never use this data for any advertising puposes.` + 'DEBUG=zapier:analytics zapier someCommand', + )}\`.\n\nYou can change your analytics preferences by re-running this command with the \`--mode\` flag.\n\nThe data collected is as generic as we can make it while still getting useful input. No specific information about your filesystem is collected. Your Zapier user id is collected so that we can better debug issues. We will never use this data for any advertising puposes.`, ); } } diff --git a/packages/cli/src/oclif/commands/build.js b/packages/cli/src/oclif/commands/build.js index 8cba03663..18d756ff0 100644 --- a/packages/cli/src/oclif/commands/build.js +++ b/packages/cli/src/oclif/commands/build.js @@ -17,11 +17,11 @@ class BuildCommand extends BaseCommand { skipNpmInstall: this.flags['skip-npm-install'], disableDependencyDetection: this.flags['disable-dependency-detection'], skipValidation: this.flags['skip-validation'], - } + }, ); this.log( - `\nBuild complete! Created ${BUILD_PATH} and ${SOURCE_PATH}. Try the \`zapier upload\` command now.` + `\nBuild complete! Created ${BUILD_PATH} and ${SOURCE_PATH}. Try the \`zapier upload\` command now.`, ); } } diff --git a/packages/cli/src/oclif/commands/cache/clear.js b/packages/cli/src/oclif/commands/cache/clear.js index 668cbfdde..9b75fe7ba 100644 --- a/packages/cli/src/oclif/commands/cache/clear.js +++ b/packages/cli/src/oclif/commands/cache/clear.js @@ -15,13 +15,13 @@ class ClearCacheCommand extends BaseCommand { let selectedMajorVersion = majorVersion ? Number(majorVersion) : null; if (Number.isNaN(selectedMajorVersion)) { throw new Error( - `Invalid major version '${majorVersion}'. Must be a number.` + `Invalid major version '${majorVersion}'. Must be a number.`, ); } const majorVersions = [ ...new Set( - versions.map((appVersion) => Number(appVersion.version.split('.')[0])) + versions.map((appVersion) => Number(appVersion.version.split('.')[0])), ), ]; // Finds the current version in package.json. @@ -31,14 +31,14 @@ class ClearCacheCommand extends BaseCommand { if (selectedMajorVersion === null) { selectedMajorVersion = await this._promptForMajorVersionSelection( majorVersions, - currentVersion + currentVersion, ); } else { if (!majorVersions.includes(selectedMajorVersion)) { throw new Error( `This integration does not have any versions on major version '${selectedMajorVersion}'. Valid versions are: ${majorVersions.join( - ', ' - )}` + ', ', + )}`, ); } } @@ -46,9 +46,9 @@ class ClearCacheCommand extends BaseCommand { if ( !(await this.confirm( `Are you sure you want to clear all cache data for major version '${cyan( - selectedMajorVersion + selectedMajorVersion, )}'?`, - true + true, )) ) { this.log('\ncancelled'); @@ -87,7 +87,7 @@ class ClearCacheCommand extends BaseCommand { return await this.promptWithList( "Which major version's cache data would you like to delete?", majorVersionChoices, - { default: currentMajorVersion } + { default: currentMajorVersion }, ); } } diff --git a/packages/cli/src/oclif/commands/canary/delete.js b/packages/cli/src/oclif/commands/canary/delete.js index de208527b..009c1e4a3 100644 --- a/packages/cli/src/oclif/commands/canary/delete.js +++ b/packages/cli/src/oclif/commands/canary/delete.js @@ -10,17 +10,17 @@ class CanaryDeleteCommand extends ZapierBaseCommand { const existingCanary = await this.findExistingCanary( versionFrom, - versionTo + versionTo, ); if (!existingCanary) { this.log( - `There is no active canary from version ${versionFrom} to version ${versionTo}` + `There is no active canary from version ${versionFrom} to version ${versionTo}`, ); return; } const confirmed = await this.confirm( - `Are you sure you want to delete the canary from ${versionFrom} to ${versionTo}?` + `Are you sure you want to delete the canary from ${versionFrom} to ${versionTo}?`, ); if (!confirmed) { this.log('Canary deletion cancelled.'); @@ -28,7 +28,7 @@ class CanaryDeleteCommand extends ZapierBaseCommand { } this.startSpinner( - `Deleting active canary from ${versionFrom} to ${versionTo}` + `Deleting active canary from ${versionFrom} to ${versionTo}`, ); await deleteCanary(versionFrom, versionTo); this.stopSpinner(); @@ -38,7 +38,7 @@ class CanaryDeleteCommand extends ZapierBaseCommand { async findExistingCanary(versionFrom, versionTo) { const activeCanaries = await listCanaries(); return activeCanaries.objects.find( - (c) => c.from_version === versionFrom && c.to_version === versionTo + (c) => c.from_version === versionFrom && c.to_version === versionTo, ); } diff --git a/packages/cli/src/oclif/commands/canary/list.js b/packages/cli/src/oclif/commands/canary/list.js index 587d4f567..c43c6f29f 100644 --- a/packages/cli/src/oclif/commands/canary/list.js +++ b/packages/cli/src/oclif/commands/canary/list.js @@ -7,11 +7,11 @@ class CanaryListCommand extends ZapierBaseCommand { async perform() { const canaries = await listCanaries(); - const formattedCanaries = canaries.objects.map(c => ({ + const formattedCanaries = canaries.objects.map((c) => ({ from_version: c.from_version, to_version: c.to_version, percent: c.percent, - seconds_remaining: c.until_timestamp - Math.floor(Date.now() / 1000) + seconds_remaining: c.until_timestamp - Math.floor(Date.now() / 1000), })); this.log(bold('Active Canaries') + '\n'); @@ -23,16 +23,14 @@ class CanaryListCommand extends ZapierBaseCommand { ['Traffic Amount', 'percent'], ['Seconds Remaining', 'seconds_remaining'], ], - emptyMessage: grey( - `No active canary deployments found.` - ), + emptyMessage: grey(`No active canary deployments found.`), }); } } CanaryListCommand.flags = buildFlags({ opts: { format: true } }); CanaryListCommand.description = 'List all active canary deployments'; -CanaryListCommand.examples = ['zapier canary:list'] +CanaryListCommand.examples = ['zapier canary:list']; CanaryListCommand.skipValidInstallCheck = true; -module.exports = CanaryListCommand; \ No newline at end of file +module.exports = CanaryListCommand; diff --git a/packages/cli/src/oclif/commands/convert.js b/packages/cli/src/oclif/commands/convert.js index 5eb92ccec..12835b77f 100644 --- a/packages/cli/src/oclif/commands/convert.js +++ b/packages/cli/src/oclif/commands/convert.js @@ -23,7 +23,7 @@ class ConvertCommand extends BaseCommand { if (!versionInfo.definition_override) { this.error( - `Integration ${appId} @ ${version} is already a CLI integration and can't be converted. Instead, pick a version that was created using the Visual Builder.` + `Integration ${appId} @ ${version} is already a CLI integration and can't be converted. Instead, pick a version that was created using the Visual Builder.`, ); } this.stopSpinner(); @@ -32,7 +32,7 @@ class ConvertCommand extends BaseCommand { } catch (e) { if (e.status === 404) { this.error( - `Visual Builder integration ${appId} @ ${version} not found. Double check the integration id and version.` + `Visual Builder integration ${appId} @ ${version} not found. Double check the integration id and version.`, ); } this.error(e.json.errors[0]); @@ -45,7 +45,7 @@ class ConvertCommand extends BaseCommand { const { version } = this.flags; if (!appId) { this.error( - 'You must provide an integrationId. See zapier convert --help for more info.' + 'You must provide an integrationId. See zapier convert --help for more info.', ); } diff --git a/packages/cli/src/oclif/commands/deprecate.js b/packages/cli/src/oclif/commands/deprecate.js index d8194baa3..52d4af9ea 100644 --- a/packages/cli/src/oclif/commands/deprecate.js +++ b/packages/cli/src/oclif/commands/deprecate.js @@ -9,7 +9,7 @@ class DeprecateCommand extends BaseCommand { const app = await this.getWritableApp(); const { version, date } = this.args; this.log( - `Preparing to deprecate version ${version} your app "${app.title}".\n` + `Preparing to deprecate version ${version} your app "${app.title}".\n`, ); const url = `/apps/${app.id}/versions/${version}/deprecate`; this.startSpinner(`Deprecating ${version}`); @@ -21,7 +21,7 @@ class DeprecateCommand extends BaseCommand { }); this.stopSpinner(); this.log( - `\nWe'll let users know that this version is no longer recommended and will cease to work on ${date}.` + `\nWe'll let users know that this version is no longer recommended and will cease to work on ${date}.`, ); } } diff --git a/packages/cli/src/oclif/commands/describe.js b/packages/cli/src/oclif/commands/describe.js index 96416505e..38728754c 100644 --- a/packages/cli/src/oclif/commands/describe.js +++ b/packages/cli/src/oclif/commands/describe.js @@ -95,7 +95,7 @@ class DescribeCommand extends BaseCommand { authentication.redirect_uri = version.oauth_redirect_uri; } else { authentication.redirect_uri = grey( - 'Run `zapier push` to see the redirect_uri.' + 'Run `zapier push` to see the redirect_uri.', ); } } @@ -134,7 +134,7 @@ class DescribeCommand extends BaseCommand { .map((method) => method({ key: resource.key })) .filter((path) => _.has(definition, path)) .join('\n'), - }) + }), ); this.logTitle('Resources'); this.logTable({ @@ -153,7 +153,7 @@ class DescribeCommand extends BaseCommand { const rows = _.values(definition[type]).map((row) => { // add possible action paths let paths = actionTemplates.map((method) => - method({ type, key: row.key }) + method({ type, key: row.key }), ); // add possible resource paths @@ -161,7 +161,7 @@ class DescribeCommand extends BaseCommand { const key = row.operation.resource.split('.')[0]; const resourceTemplates = makeResourceTemplates(typeMap[type]); paths = paths.concat( - resourceTemplates.map((method) => method({ key })) + resourceTemplates.map((method) => method({ key })), ); } @@ -182,7 +182,7 @@ class DescribeCommand extends BaseCommand { ['Available Methods', 'paths', grey('n/a')], ], emptyMessage: grey( - `Nothing found for ${type}. Use the \`zapier scaffold\` command to add one.` + `Nothing found for ${type}. Use the \`zapier scaffold\` command to add one.`, ), }); diff --git a/packages/cli/src/oclif/commands/env/set.js b/packages/cli/src/oclif/commands/env/set.js index f1670f8f0..9eb677988 100644 --- a/packages/cli/src/oclif/commands/env/set.js +++ b/packages/cli/src/oclif/commands/env/set.js @@ -8,7 +8,7 @@ const { callAPI } = require('../../../utils/api'); const successMessage = (version) => `Successfully wrote the following to the environment of version ${cyan( - version + version, )}:`; class SetEnvCommand extends BaseCommand { @@ -20,7 +20,7 @@ class SetEnvCommand extends BaseCommand { if (!valuesToSet.length) { this.error( - 'Must specify at least one key-value pair to set (like `SOME_KEY=1234`)' + 'Must specify at least one key-value pair to set (like `SOME_KEY=1234`)', ); } @@ -40,7 +40,7 @@ class SetEnvCommand extends BaseCommand { const app = await this.getWritableApp(); if (!app.all_versions.includes(version)) { this.error( - `Version ${version} doesn't exist on integration "${app.title}"` + `Version ${version} doesn't exist on integration "${app.title}"`, ); } @@ -54,7 +54,7 @@ class SetEnvCommand extends BaseCommand { body: payload, method: 'POST', }, - true + true, ); this.log(successMessage(version)); diff --git a/packages/cli/src/oclif/commands/env/unset.js b/packages/cli/src/oclif/commands/env/unset.js index 532a13c96..cc70a655d 100644 --- a/packages/cli/src/oclif/commands/env/unset.js +++ b/packages/cli/src/oclif/commands/env/unset.js @@ -7,7 +7,7 @@ const { callAPI } = require('../../../utils/api'); const successMessage = (version) => `Successfully unset the following keys in the environment of version ${cyan( - version + version, )} (if they existed):`; class UnsetEnvCommand extends BaseCommand { @@ -37,7 +37,7 @@ class UnsetEnvCommand extends BaseCommand { const app = await this.getWritableApp(); if (!app.all_versions.includes(version)) { this.error( - `Version ${version} doesn't exist on integration "${app.title}"` + `Version ${version} doesn't exist on integration "${app.title}"`, ); } diff --git a/packages/cli/src/oclif/commands/invoke.js b/packages/cli/src/oclif/commands/invoke.js index 323ba34ab..24620e66b 100644 --- a/packages/cli/src/oclif/commands/invoke.js +++ b/packages/cli/src/oclif/commands/invoke.js @@ -68,7 +68,7 @@ const readStream = async (stream) => { const getMissingRequiredInputFields = (inputData, inputFields) => { return inputFields.filter( - (f) => f.required && !f.default && !inputData[f.key] + (f) => f.required && !f.default && !inputData[f.key], ); }; @@ -145,7 +145,7 @@ const parseTimestamp = (dtString, tzName) => { } return DateTime.fromMillis(timestamp, { zone: tzName }).toFormat( - "yyyy-MM-dd'T'HH:mm:ssZZ" + "yyyy-MM-dd'T'HH:mm:ssZZ", ); }; @@ -179,7 +179,7 @@ const parseDatetime = (dtString, tzName, now) => { } return DateTime.fromISO(isoString, { zone: tzName }).toFormat( - "yyyy-MM-dd'T'HH:mm:ssZZ" + "yyyy-MM-dd'T'HH:mm:ssZZ", ); }; @@ -231,7 +231,7 @@ const appendEnv = async (vars, prefix = '') => { '.env', Object.entries(vars) .filter(([k, v]) => v !== undefined) - .map(([k, v]) => `${prefix}${k}='${v || ''}'\n`) + .map(([k, v]) => `${prefix}${k}='${v || ''}'\n`), ); }; @@ -351,7 +351,7 @@ class InvokeCommand extends BaseCommand { async startBasicAuth(authFields) { if (this.nonInteractive) { throw new Error( - 'The `auth start` subcommand for "basic" authentication type only works in interactive mode.' + 'The `auth start` subcommand for "basic" authentication type only works in interactive mode.', ); } return this.promptForAuthFields([ @@ -371,7 +371,7 @@ class InvokeCommand extends BaseCommand { async startCustomAuth(authFields, zcacheTestObj) { if (this.nonInteractive) { throw new Error( - 'The `auth start` subcommand for "custom" authentication type only works in interactive mode.' + 'The `auth start` subcommand for "custom" authentication type only works in interactive mode.', ); } return this.promptForAuthFields(authFields); @@ -385,12 +385,12 @@ class InvokeCommand extends BaseCommand { if (!process.env.CLIENT_ID || !process.env.CLIENT_SECRET) { if (this.nonInteractive) { throw new Error( - 'CLIENT_ID and CLIENT_SECRET must be set in the .env file in non-interactive mode.' + 'CLIENT_ID and CLIENT_SECRET must be set in the .env file in non-interactive mode.', ); } else { console.warn( 'CLIENT_ID and CLIENT_SECRET are required for OAuth2, ' + - "but they are not found in the .env file. I'll prompt you for them now." + "but they are not found in the .env file. I'll prompt you for them now.", ); } } @@ -458,14 +458,14 @@ class InvokeCommand extends BaseCommand { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end( - 'Parameter `code` received successfully. Go back to the terminal to continue.' + 'Parameter `code` received successfully. Go back to the terminal to continue.', ); } else { res.writeHead(400, { 'Content-Type': 'text/plain' }); res.end( 'Error: Did not receive `code` query parameter. ' + 'Did you have the right CLIENT_ID and CLIENT_SECRET? ' + - 'Or did your server respond properly?' + 'Or did your server respond properly?', ); } }); @@ -476,7 +476,7 @@ class InvokeCommand extends BaseCommand { endSpinner(); startSpinner( - 'Opening browser to authorize (press Ctrl-C to exit on error)' + 'Opening browser to authorize (press Ctrl-C to exit on error)', ); const { default: open } = await import('open'); @@ -515,11 +515,11 @@ class InvokeCommand extends BaseCommand { async startSessionAuth(appDefinition, zcacheTestObj) { if (this.nonInteractive) { throw new Error( - 'The `auth start` subcommand for "session" authentication type only works in interactive mode.' + 'The `auth start` subcommand for "session" authentication type only works in interactive mode.', ); } const authData = await this.promptForAuthFields( - appDefinition.authentication.fields + appDefinition.authentication.fields, ); startSpinner('Invoking authentication.sessionConfig.perform'); @@ -544,7 +544,7 @@ class InvokeCommand extends BaseCommand { console.warn( "Your integration doesn't seem to need authentication. " + "If that isn't true, the app definition should have " + - 'an `authentication` object at the root level.' + 'an `authentication` object at the root level.', ); return null; } @@ -560,7 +560,7 @@ class InvokeCommand extends BaseCommand { default: // TODO: Add support for 'digest' and 'oauth1' throw new Error( - `This command doesn't support authentication type "${authentication.type}".` + `This command doesn't support authentication type "${authentication.type}".`, ); } } @@ -607,13 +607,13 @@ class InvokeCommand extends BaseCommand { console.warn( "Your integration doesn't seem to need authentication. " + "If that isn't true, the app definition should have " + - 'an `authentication` object at the root level.' + 'an `authentication` object at the root level.', ); return null; } if (_.isEmpty(authData)) { throw new Error( - 'No auth data found in the .env file. Run `zapier invoke auth start` first to initialize the auth data.' + 'No auth data found in the .env file. Run `zapier invoke auth start` first to initialize the auth data.', ); } switch (authentication.type) { @@ -623,7 +623,7 @@ class InvokeCommand extends BaseCommand { return this.refreshSessionAuth(appDefinition, authData, zcacheTestObj); default: throw new Error( - `This command doesn't support refreshing authentication type "${authentication.type}".` + `This command doesn't support refreshing authentication type "${authentication.type}".`, ); } } @@ -635,7 +635,7 @@ class InvokeCommand extends BaseCommand { authData, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ) { const message = formatFieldDisplay(field) + ':'; if (field.dynamic) { @@ -659,7 +659,7 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); return this.promptWithList( message, @@ -671,7 +671,7 @@ class InvokeCommand extends BaseCommand { value: id, }; }), - { useStderr: true } + { useStderr: true }, ); } else if (field.type === 'boolean') { const yes = await this.confirm(message, false, !field.required, true); @@ -689,14 +689,14 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ) { const missingFields = getMissingRequiredInputFields(inputData, inputFields); if (missingFields.length) { if (this.nonInteractive || meta.isFillingDynamicDropdown) { throw new Error( "You're in non-interactive mode, so you must at least specify these required fields with --inputData: \n" + - missingFields.map((f) => '* ' + formatFieldDisplay(f)).join('\n') + missingFields.map((f) => '* ' + formatFieldDisplay(f)).join('\n'), ); } for (const f of missingFields) { @@ -707,7 +707,7 @@ class InvokeCommand extends BaseCommand { authData, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); } } @@ -720,7 +720,7 @@ class InvokeCommand extends BaseCommand { authData, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ) { inputFields = inputFields.filter((f) => f.key); if (!inputFields.length) { @@ -757,7 +757,7 @@ class InvokeCommand extends BaseCommand { const fieldKey = await this.promptWithList( 'Would you like to edit any of these input fields? Select "DONE" when you are all set.', fieldChoices, - { useStderr: true } + { useStderr: true }, ); if (!fieldKey) { break; @@ -771,7 +771,7 @@ class InvokeCommand extends BaseCommand { authData, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); } } @@ -784,7 +784,7 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ) { await this.promptOrErrorForRequiredInputFields( inputData, @@ -794,7 +794,7 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); if (!this.nonInteractive && !meta.isFillingDynamicDropdown) { await this.promptForInputFieldEdit( @@ -804,7 +804,7 @@ class InvokeCommand extends BaseCommand { authData, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); } } @@ -818,7 +818,7 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ) { // Do these in order: // 1. Prompt for static input fields that alter dynamic fields @@ -827,7 +827,7 @@ class InvokeCommand extends BaseCommand { // 4. {actionTypePlural}.{actionKey}.operation.perform const staticInputFields = (action.operation.inputFields || []).filter( - (f) => f.key + (f) => f.key, ); debug('staticInputFields:', staticInputFields); @@ -839,7 +839,7 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); let methodName = `${actionTypePlural}.${action.key}.operation.inputFields`; @@ -871,7 +871,7 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); } @@ -902,7 +902,7 @@ class InvokeCommand extends BaseCommand { if (_.isEmpty(dotenvResult.parsed)) { console.warn( 'The .env file does not exist or is empty. ' + - 'You may need to set some environment variables in there if your code uses process.env.' + 'You may need to set some environment variables in there if your code uses process.env.', ); } @@ -913,13 +913,13 @@ class InvokeCommand extends BaseCommand { if (!actionType) { if (this.nonInteractive) { throw new Error( - 'You must specify ACTIONTYPE and ACTIONKEY in non-interactive mode.' + 'You must specify ACTIONTYPE and ACTIONKEY in non-interactive mode.', ); } actionType = await this.promptWithList( 'Which action type would you like to invoke?', ACTION_TYPES, - { useStderr: true } + { useStderr: true }, ); } @@ -935,22 +935,22 @@ class InvokeCommand extends BaseCommand { actionKey = await this.promptWithList( 'Which auth operation would you like to invoke?', actionKeys, - { useStderr: true } + { useStderr: true }, ); } else { const actionKeys = Object.keys( - appDefinition[actionTypePlural] || {} + appDefinition[actionTypePlural] || {}, ).sort(); if (!actionKeys.length) { throw new Error( - `No "${actionTypePlural}" found in your integration.` + `No "${actionTypePlural}" found in your integration.`, ); } actionKey = await this.promptWithList( `Which "${actionType}" key would you like to invoke?`, actionKeys, - { useStderr: true } + { useStderr: true }, ); } } @@ -972,14 +972,14 @@ class InvokeCommand extends BaseCommand { case 'start': { const newAuthData = await this.startAuth( appDefinition, - zcacheTestObj + zcacheTestObj, ); if (_.isEmpty(newAuthData)) { return; } await appendEnv(newAuthData, AUTH_FIELD_ENV_PREFIX); console.warn( - 'Auth data appended to .env file. Run `zapier invoke auth test` to test it.' + 'Auth data appended to .env file. Run `zapier invoke auth test` to test it.', ); return; } @@ -987,14 +987,14 @@ class InvokeCommand extends BaseCommand { const newAuthData = await this.refreshAuth( appDefinition, authData, - zcacheTestObj + zcacheTestObj, ); if (_.isEmpty(newAuthData)) { return; } await appendEnv(newAuthData, AUTH_FIELD_ENV_PREFIX); console.warn( - 'Auth data has been refreshed and appended to .env file. Run `zapier invoke auth test` to test it.' + 'Auth data has been refreshed and appended to .env file. Run `zapier invoke auth test` to test it.', ); return; } @@ -1007,7 +1007,7 @@ class InvokeCommand extends BaseCommand { const labelTemplate = appDefinition.authentication.connectionLabel; if (labelTemplate && labelTemplate.startsWith('$func$')) { console.warn( - 'Function-based connection label is not supported yet. Printing auth test result instead.' + 'Function-based connection label is not supported yet. Printing auth test result instead.', ); const output = await testAuth(authData, meta, zcacheTestObj); console.log(JSON.stringify(output, null, 2)); @@ -1016,7 +1016,7 @@ class InvokeCommand extends BaseCommand { labelTemplate, authData, meta, - zcacheTestObj + zcacheTestObj, ); if (output) { console.log(output); @@ -1029,7 +1029,7 @@ class InvokeCommand extends BaseCommand { default: throw new Error( `Unknown auth operation "${actionKey}". ` + - 'The options are "label", "refresh", "start", and "test". \n' + 'The options are "label", "refresh", "start", and "test". \n', ); } } else { @@ -1067,7 +1067,7 @@ class InvokeCommand extends BaseCommand { 'All primitive values in --inputData must be strings. Found non-string values in these paths:\n' + nonStringPrimitives .map(({ path, value }) => `* ${value} at ${path}`) - .join('\n') + .join('\n'), ); } @@ -1089,7 +1089,7 @@ class InvokeCommand extends BaseCommand { meta, timezone, zcacheTestObj, - cursorTestObj + cursorTestObj, ); console.log(JSON.stringify(output, null, 2)); } diff --git a/packages/cli/src/oclif/commands/jobs.js b/packages/cli/src/oclif/commands/jobs.js index bcfd5e276..6586bd860 100644 --- a/packages/cli/src/oclif/commands/jobs.js +++ b/packages/cli/src/oclif/commands/jobs.js @@ -22,7 +22,7 @@ class JobsCommand extends BaseCommand { const jobs = chain(migrations) .filter( (migration) => - migration.job_kind === 'migrate' || migration.job_kind === 'promote' + migration.job_kind === 'migrate' || migration.job_kind === 'promote', ) .map((migration) => { const job = { diff --git a/packages/cli/src/oclif/commands/link.js b/packages/cli/src/oclif/commands/link.js index 11d2961b8..bd062d511 100644 --- a/packages/cli/src/oclif/commands/link.js +++ b/packages/cli/src/oclif/commands/link.js @@ -29,9 +29,9 @@ class LinkCommand extends BaseCommand { short: app.title, value: { id: app.id, key: app.key }, })), - (app) => app.name.toLowerCase() + (app) => app.name.toLowerCase(), ), - { pageSize: 15 } + { pageSize: 15 }, ); this.startSpinner(`Setting up ${CURRENT_APP_FILE}`); diff --git a/packages/cli/src/oclif/commands/login.js b/packages/cli/src/oclif/commands/login.js index 2ac69e700..3b0a99893 100644 --- a/packages/cli/src/oclif/commands/login.js +++ b/packages/cli/src/oclif/commands/login.js @@ -49,7 +49,7 @@ const isValidDeployKey = (k) => class LoginCommand extends BaseCommand { promptForDeployKey() { this.log( - `To generate a deploy key, go to ${DEPLOY_KEY_DASH_URL} and create/copy a key, then paste the result below.` + `To generate a deploy key, go to ${DEPLOY_KEY_DASH_URL} and create/copy a key, then paste the result below.`, ); return this.prompt('Paste your Deploy Key here:', { validate: isValidDeployKey, @@ -70,19 +70,19 @@ class LoginCommand extends BaseCommand { if (!credentialsPresent) { this.stopSpinner(); // end the spinner in checkCredentials() this.log( - colors.yellow(`Your ${AUTH_LOCATION} has not been set up yet.\n`) + colors.yellow(`Your ${AUTH_LOCATION} has not been set up yet.\n`), ); } else if (!credentialsGood) { this.log( colors.red( - `Your ${AUTH_LOCATION} looks like it has invalid credentials.\n` - ) + `Your ${AUTH_LOCATION} looks like it has invalid credentials.\n`, + ), ); } else { this.log( colors.green( - `Your ${AUTH_LOCATION} looks valid. You may update it now though.\n` - ) + `Your ${AUTH_LOCATION} looks valid. You may update it now though.\n`, + ), ); } @@ -93,7 +93,7 @@ class LoginCommand extends BaseCommand { deployKey = await this.promptForDeployKey(); } else { const email = await this.prompt( - 'What email address do you use to log into Zapier?' + 'What email address do you use to log into Zapier?', ); if (await isSamlEmail(email)) { // category 2 @@ -102,13 +102,13 @@ class LoginCommand extends BaseCommand { // category 1 this.log( `\n\nNow you'll enter your Zapier password.\nIf you log into Zapier via the ${colors.green( - 'log in with Google button' + 'log in with Google button', )} (or a different social network), you may not have a Zapier password.\nIf that's the case, hit CTRL+C and re-run this command with the ${colors.cyan( - `--sso` - )} flag.\n\n` + `--sso`, + )} flag.\n\n`, ); const password = await this.promptHidden( - 'What is your Zapier password?' + 'What is your Zapier password?', ); let goodResponse; @@ -118,7 +118,7 @@ class LoginCommand extends BaseCommand { if (errors[0].startsWith('missing totp_code')) { const code = await this.prompt( 'What is your current 6-digit 2FA code?', - { validate: isValidTotpCode } + { validate: isValidTotpCode }, ); goodResponse = await createCredentials(email, password, code); } else { @@ -132,7 +132,7 @@ class LoginCommand extends BaseCommand { AUTH_LOCATION, prettyJSONstringify({ [AUTH_KEY]: deployKey, - }) + }), ); await checkCredentials(); diff --git a/packages/cli/src/oclif/commands/logout.js b/packages/cli/src/oclif/commands/logout.js index a09496fa1..12a2a7344 100644 --- a/packages/cli/src/oclif/commands/logout.js +++ b/packages/cli/src/oclif/commands/logout.js @@ -14,7 +14,7 @@ class LogoutCommand extends BaseCommand { } catch (e) { success = false; this.error( - `Deletion API request failed. Is your ${AUTH_LOCATION} already empty or invalid? If so, feel free to ignore this error.` + `Deletion API request failed. Is your ${AUTH_LOCATION} already empty or invalid? If so, feel free to ignore this error.`, ); } finally { this.stopSpinner({ success }); diff --git a/packages/cli/src/oclif/commands/logs.js b/packages/cli/src/oclif/commands/logs.js index 2eaac213d..0387f9ffb 100644 --- a/packages/cli/src/oclif/commands/logs.js +++ b/packages/cli/src/oclif/commands/logs.js @@ -102,8 +102,8 @@ class LogsCommand extends BaseCommand { if (this.flags.type === 'http' && !this.flags.detailed) { this.log( grey( - ' TIP: Use `zapier logs --type=http --detailed` to include response information.' - ) + ' TIP: Use `zapier logs --type=http --detailed` to include response information.', + ), ); } } diff --git a/packages/cli/src/oclif/commands/migrate.js b/packages/cli/src/oclif/commands/migrate.js index ead660b18..6492c9c12 100644 --- a/packages/cli/src/oclif/commands/migrate.js +++ b/packages/cli/src/oclif/commands/migrate.js @@ -24,13 +24,13 @@ class MigrateCommand extends BaseCommand { if (user && account) { this.error( - 'Cannot specify both `--user` and `--account`. Use only one or the other.' + 'Cannot specify both `--user` and `--account`. Use only one or the other.', ); } if ((user || account) && percent !== 100) { this.error( - `Cannot specify both \`PERCENT\` and \`--${flagType}\`. Use only one or the other.` + `Cannot specify both \`PERCENT\` and \`--${flagType}\`. Use only one or the other.`, ); } @@ -45,12 +45,12 @@ class MigrateCommand extends BaseCommand { toVersion !== app.latest_version ) { this.log( - `You're trying to migrate all the users to ${toVersion}, which is not the current production version.` + `You're trying to migrate all the users to ${toVersion}, which is not the current production version.`, ); promoteFirst = await this.confirm( `Do you want to promote ${toVersion} to production first?`, true, - true + true, ); } @@ -71,11 +71,11 @@ class MigrateCommand extends BaseCommand { this.startSpinner( `Starting migration from ${fromVersion} to ${toVersion} for ${ user || account - }` + }`, ); } else { this.startSpinner( - `Starting migration from ${fromVersion} to ${toVersion} for ${percent}%` + `Starting migration from ${fromVersion} to ${toVersion} for ${percent}%`, ); } if (percent) { @@ -91,7 +91,7 @@ class MigrateCommand extends BaseCommand { } this.log( - '\nMigration successfully queued, please check `zapier jobs` to track the status. Migrations usually take between 5-10 minutes.' + '\nMigration successfully queued, please check `zapier jobs` to track the status. Migrations usually take between 5-10 minutes.', ); } } diff --git a/packages/cli/src/oclif/commands/promote.js b/packages/cli/src/oclif/commands/promote.js index 36b101716..b206909ac 100644 --- a/packages/cli/src/oclif/commands/promote.js +++ b/packages/cli/src/oclif/commands/promote.js @@ -37,8 +37,8 @@ const hasAppChangeType = (metadata, changeType) => { metadata?.some( // Existing property name // eslint-disable-next-line camelcase - ({ app_change_type }) => app_change_type === changeType - ) + ({ app_change_type }) => app_change_type === changeType, + ), ); }; @@ -52,19 +52,18 @@ class PromoteCommand extends BaseCommand { const assumeYes = 'yes' in this.flags; let shouldContinue; - const { changelog, appMetadata, issueMetadata } = await getVersionChangelog( - version - ); + const { changelog, appMetadata, issueMetadata } = + await getVersionChangelog(version); const metadataPromptHelper = `Issues are indicated by ${colors.bold.underline( - '#' + '#', )}, and actions by ${colors.bold.underline( - '/' + '/', )}. Note issue IDs must be numeric and action identifiers are case sensitive.`; if (!changelog) { this.error(`${colors.yellow( - 'Warning!' + 'Warning!', )} Changelog not found. Please create a CHANGELOG.md file with user-facing descriptions. Example: ${colors.cyan(EXAMPLE_CHANGELOG)} If bugfixes or updates to actions are present, then should be marked on a line that begins with "Update" or "Fix" (case insensitive) and information that contains the identifier. @@ -81,7 +80,7 @@ ${metadataPromptHelper}`); .filter(({ app_change_type }) => app_change_type === 'FEATURE_UPDATE') .map( ({ action_type, action_key }) => - `${action_key}/${ACTION_TYPE_MAPPING[action_type]}` + `${action_key}/${ACTION_TYPE_MAPPING[action_type]}`, ); const issueFeatureUpdates = @@ -95,7 +94,7 @@ ${metadataPromptHelper}`); `Feature updates: ${[ ...(appFeatureUpdates ?? []), ...(issueFeatureUpdates ?? []), - ].join(', ')}` + ].join(', ')}`, ); } @@ -105,7 +104,7 @@ ${metadataPromptHelper}`); .filter(({ app_change_type }) => app_change_type === 'BUGFIX') .map( ({ action_type, action_key }) => - `${action_key}/${ACTION_TYPE_MAPPING[action_type]}` + `${action_key}/${ACTION_TYPE_MAPPING[action_type]}`, ); const issueBugfixes = issueMetadata && @@ -116,8 +115,8 @@ ${metadataPromptHelper}`); if (appBugfixes || issueBugfixes) { this.log( `Bug fixes: ${[...(appBugfixes ?? []), ...(issueBugfixes ?? [])].join( - ', ' - )}` + ', ', + )}`, ); } @@ -128,7 +127,7 @@ ${metadataPromptHelper}`); !issueBugfixes ) { this.log( - `No metadata was found in the changelog. Remember, you can associate the changelog with issues or triggers/actions.\n\n${metadataPromptHelper}` + `No metadata was found in the changelog. Remember, you can associate the changelog with issues or triggers/actions.\n\n${metadataPromptHelper}`, ); } this.log(); @@ -137,7 +136,7 @@ ${metadataPromptHelper}`); shouldContinue = assumeYes || (await this.confirm( - 'Would you like to continue promoting with this changelog?' + 'Would you like to continue promoting with this changelog?', )); } @@ -146,7 +145,7 @@ ${metadataPromptHelper}`); } this.log( - `Preparing to promote version ${version} of your integration "${app.title}".` + `Preparing to promote version ${version} of your integration "${app.title}".`, ); const isFeatureUpdate = @@ -178,7 +177,7 @@ ${metadataPromptHelper}`); method: 'POST', body, }, - true + true, ); } catch (response) { const activationUrl = _.get(response, ['json', 'activationInfo', 'url']); @@ -187,8 +186,8 @@ ${metadataPromptHelper}`); this.log('\nGood news! Your integration passes validation.'); this.log( `The next step is to visit ${colors.cyan( - activationUrl - )} to request to publish your integration.` + activationUrl, + )} to request to publish your integration.`, ); } else { this.stopSpinner({ success: false }); @@ -211,7 +210,7 @@ ${metadataPromptHelper}`); this.log(' Promotion successful!'); if (!this.flags.invokedFromAnotherCommand) { this.log( - 'Optionally, run the `zapier migrate` command to move users to this version.' + 'Optionally, run the `zapier migrate` command to move users to this version.', ); } } diff --git a/packages/cli/src/oclif/commands/push.js b/packages/cli/src/oclif/commands/push.js index 83d1970ed..56b411486 100644 --- a/packages/cli/src/oclif/commands/push.js +++ b/packages/cli/src/oclif/commands/push.js @@ -13,10 +13,10 @@ class PushCommand extends ZapierBaseCommand { skipNpmInstall: this.flags['skip-npm-install'], disableDependencyDetection: this.flags['disable-dependency-detection'], skipValidation: this.flags['skip-validation'], - } + }, ); this.log( - `\nPush complete! Built ${BUILD_PATH} and ${SOURCE_PATH} and uploaded them to Zapier.` + `\nPush complete! Built ${BUILD_PATH} and ${SOURCE_PATH} and uploaded them to Zapier.`, ); } } diff --git a/packages/cli/src/oclif/commands/register.js b/packages/cli/src/oclif/commands/register.js index fd04749b0..a7d6c50d7 100644 --- a/packages/cli/src/oclif/commands/register.js +++ b/packages/cli/src/oclif/commands/register.js @@ -29,7 +29,7 @@ class RegisterCommand extends ZapierBaseCommand { this.flags.desc.length > MAX_DESCRIPTION_LENGTH ) { throw new Error( - `Please provide a description that is ${MAX_DESCRIPTION_LENGTH} characters or less.` + `Please provide a description that is ${MAX_DESCRIPTION_LENGTH} characters or less.`, ); } @@ -38,7 +38,7 @@ class RegisterCommand extends ZapierBaseCommand { this.args.title.length < MIN_TITLE_LENGTH ) { throw new Error( - `Please provide a title that is ${MIN_TITLE_LENGTH} characters or more.` + `Please provide a title that is ${MIN_TITLE_LENGTH} characters or more.`, ); } @@ -47,7 +47,7 @@ class RegisterCommand extends ZapierBaseCommand { switch (action) { case 'update': { this.startSpinner( - `Updating your existing integration "${appMeta.title}"` + `Updating your existing integration "${appMeta.title}"`, ); await callAPI(`/apps/${this.app.id}`, { method: 'PUT', @@ -60,7 +60,7 @@ class RegisterCommand extends ZapierBaseCommand { case 'register': { this.startSpinner( - `Registering your new integration "${appMeta.title}"` + `Registering your new integration "${appMeta.title}"`, ); const app = await callAPI('/apps?formId=create', { method: 'POST', @@ -68,12 +68,12 @@ class RegisterCommand extends ZapierBaseCommand { }); this.stopSpinner(); this.startSpinner( - `Linking app to current directory with \`${CURRENT_APP_FILE}\`` + `Linking app to current directory with \`${CURRENT_APP_FILE}\``, ); await writeLinkedAppConfig(app, process.cwd()); this.stopSpinner(); this.log( - '\nFinished! Now that your integration is registered with Zapier, you can `zapier push`!' + '\nFinished! Now that your integration is registered with Zapier, you can `zapier push`!', ); break; } @@ -104,7 +104,7 @@ class RegisterCommand extends ZapierBaseCommand { throw new Error( `${flagValue} is not a valid value for ${flag}. Must be one of the following: ${enumFieldChoices .map((option) => option.value) - .join(', ')}` + .join(', ')}`, ); } } @@ -131,14 +131,14 @@ class RegisterCommand extends ZapierBaseCommand { if (this.flags.yes) { console.info( colors.yellow( - `-y/--yes flag passed, updating current integration (ID: ${linkedAppId}).` - ) + `-y/--yes flag passed, updating current integration (ID: ${linkedAppId}).`, + ), ); action = actionChoices[0].value; } else { action = await this.promptWithList( `Would you like to update your current integration (ID: ${linkedAppId})?`, - actionChoices + actionChoices, ); } } @@ -151,7 +151,7 @@ class RegisterCommand extends ZapierBaseCommand { // Block published apps from updating settings if (this.app?.status && isPublished(this.app.status)) { throw new Error( - "You can't edit settings for this integration. To edit your integration details on Zapier's public app directory, email partners@zapier.com." + "You can't edit settings for this integration. To edit your integration details on Zapier's public app directory, email partners@zapier.com.", ); } } @@ -164,7 +164,7 @@ class RegisterCommand extends ZapierBaseCommand { required: true, charMinimum: MIN_TITLE_LENGTH, default: this.app?.title, - } + }, ); } @@ -176,7 +176,7 @@ class RegisterCommand extends ZapierBaseCommand { required: true, charLimit: MAX_DESCRIPTION_LENGTH, default: this.app?.description, - } + }, ); } @@ -184,7 +184,7 @@ class RegisterCommand extends ZapierBaseCommand { if (!appMeta.homepage_url) { appMeta.homepage_url = await this.prompt( 'What is the homepage URL of your app? (optional)', - { default: this.app?.homepage_url } + { default: this.app?.homepage_url }, ); } @@ -193,7 +193,7 @@ class RegisterCommand extends ZapierBaseCommand { appMeta.intention = await this.promptWithList( 'Are you building a public or private integration?', this.config.enumFieldChoices.intention, - { default: this.app?.intention } + { default: this.app?.intention }, ); } @@ -203,9 +203,9 @@ class RegisterCommand extends ZapierBaseCommand { "What is your relationship with the app you're integrating with Zapier?", this._getRoleChoicesWithAppTitle( appMeta.title, - this.config.enumFieldChoices.role + this.config.enumFieldChoices.role, ), - { default: this.app?.role } + { default: this.app?.role }, ); } @@ -214,7 +214,7 @@ class RegisterCommand extends ZapierBaseCommand { appMeta.app_category = await this.promptWithList( 'How would you categorize your app?', this.config.enumFieldChoices.app_category, - { default: this.app?.app_category } + { default: this.app?.app_category }, ); } @@ -229,7 +229,7 @@ class RegisterCommand extends ZapierBaseCommand { [ { name: 'Yes', value: true }, { name: 'No', value: false }, - ] + ], ); } } diff --git a/packages/cli/src/oclif/commands/scaffold.js b/packages/cli/src/oclif/commands/scaffold.js index baecc629f..d1aa86567 100644 --- a/packages/cli/src/oclif/commands/scaffold.js +++ b/packages/cli/src/oclif/commands/scaffold.js @@ -83,7 +83,7 @@ class ScaffoldCommand extends BaseCommand { context.language, context.indexFileResolved, context.actionType, - context.templateContext.KEY + context.templateContext.KEY, ); this.stopSpinner({ success }); @@ -92,7 +92,7 @@ class ScaffoldCommand extends BaseCommand { const entryName = splitFileFromPath(context.indexFileResolved)[1]; this.startSpinner( - `Unable to successfully rewrite your ${entryName}. Rolling back...` + `Unable to successfully rewrite your ${entryName}. Rolling back...`, ); await writeFile(context.indexFileResolved, originalContents); this.stopSpinner(); @@ -104,7 +104,7 @@ class ScaffoldCommand extends BaseCommand { ` * \`[${context.templateContext.VARIABLE}.key]: ${context.templateContext.VARIABLE}\` in the "${context.actionTypePlural}" object in your exported integration definition.`, '', `Also, please file an issue at ${ISSUES_URL} with the contents of your ${context.indexFileResolved}.`, - ].join('\n') + ].join('\n'), ); } } diff --git a/packages/cli/src/oclif/commands/team/add.js b/packages/cli/src/oclif/commands/team/add.js index 1553b9184..88d8714aa 100644 --- a/packages/cli/src/oclif/commands/team/add.js +++ b/packages/cli/src/oclif/commands/team/add.js @@ -29,7 +29,7 @@ class TeamAddCommand extends ZapierBaseCommand { `About to invite ${cyan(this.args.email)} to as a team member at the ${ this.args.role } level. An email will be sent with the following message:\n\n"${message}"\n\nIs that ok?`, - true + true, )) ) { this.log('\ncancelled'); @@ -42,8 +42,8 @@ class TeamAddCommand extends ZapierBaseCommand { role === 'admin' ? `/apps/${id}/collaborators` : role === 'subscriber' - ? `${BASE_ENDPOINT}/api/platform/v3/integrations/${id}/subscribers` - : `/apps/${id}/limited_collaborators`; + ? `${BASE_ENDPOINT}/api/platform/v3/integrations/${id}/subscribers` + : `/apps/${id}/limited_collaborators`; await callAPI(url, { url: url.startsWith('http') ? url : undefined, diff --git a/packages/cli/src/oclif/commands/team/get.js b/packages/cli/src/oclif/commands/team/get.js index 01dbe0329..e949a18df 100644 --- a/packages/cli/src/oclif/commands/team/get.js +++ b/packages/cli/src/oclif/commands/team/get.js @@ -34,8 +34,8 @@ class TeamListCommand extends ZapierBaseCommand { this.log( `To invite more team members, use the \`${cyan( - 'zapier team:add' - )}\` command.` + 'zapier team:add', + )}\` command.`, ); } } diff --git a/packages/cli/src/oclif/commands/team/remove.js b/packages/cli/src/oclif/commands/team/remove.js index 3eac469eb..968cc635a 100644 --- a/packages/cli/src/oclif/commands/team/remove.js +++ b/packages/cli/src/oclif/commands/team/remove.js @@ -17,7 +17,7 @@ class TeamRemoveCommand extends ZapierBaseCommand { value: { id, email, role: transformUserRole(role) }, name: `${email} (${transformUserRole(role)})`, short: email, - }) + }), ); this.stopSpinner(); @@ -28,15 +28,15 @@ class TeamRemoveCommand extends ZapierBaseCommand { id: invitationId, } = await this.promptWithList( 'Which team member do you want to remove?', - choices + choices, ); this.log(); if ( !(await this.confirm( `About to revoke ${cyan(role)}-level access from ${cyan( - email + email, )}. Are you sure?`, - true + true, )) ) { this.log('\ncancelled'); @@ -49,8 +49,8 @@ class TeamRemoveCommand extends ZapierBaseCommand { role === 'admin' ? `/apps/${appId}/collaborators/${invitationId}` : role === 'subscriber' - ? `${BASE_ENDPOINT}/api/platform/v3/integrations/${appId}/subscribers/${invitationId}` - : `/apps/${appId}/limited_collaborators`; + ? `${BASE_ENDPOINT}/api/platform/v3/integrations/${appId}/subscribers/${invitationId}` + : `/apps/${appId}/limited_collaborators`; await callAPI(url, { url: url.startsWith('http') ? url : undefined, diff --git a/packages/cli/src/oclif/commands/test.js b/packages/cli/src/oclif/commands/test.js index d40ba7080..fe0393f2e 100644 --- a/packages/cli/src/oclif/commands/test.js +++ b/packages/cli/src/oclif/commands/test.js @@ -27,7 +27,7 @@ class TestCommand extends BaseCommand { const credentials = await readCredentials(false); if (credentials.deployKey) { this.log( - `Adding ${constants.AUTH_LOCATION} to environment as ZAPIER_DEPLOY_KEY...` + `Adding ${constants.AUTH_LOCATION} to environment as ZAPIER_DEPLOY_KEY...`, ); extraEnv.ZAPIER_DEPLOY_KEY = credentials.deployKey; } @@ -53,10 +53,10 @@ class TestCommand extends BaseCommand { // but the space-joined array made that unclear this.log( `\n ${chalk.cyanBright.bold( - packageManager.executable + packageManager.executable, )} ${chalk.cyanBright( - argv.map((a) => (a.includes(' ') ? `"${a}"` : a)).join(' ') - )}\n` + argv.map((a) => (a.includes(' ') ? `"${a}"` : a)).join(' '), + )}\n`, ); const output = await runCommand(packageManager.executable, argv, { diff --git a/packages/cli/src/oclif/commands/upload.js b/packages/cli/src/oclif/commands/upload.js index 5dd4e87da..46559f218 100644 --- a/packages/cli/src/oclif/commands/upload.js +++ b/packages/cli/src/oclif/commands/upload.js @@ -10,7 +10,7 @@ class UploadCommand extends BaseCommand { // it would be cool if we differentiated between new/updated here await buildAndOrUpload({ upload: true }); this.log( - `\nUpload complete! Uploaded ${BUILD_PATH} and ${SOURCE_PATH} to Zapier. If it's a new version, it should now be available in the Zap editor.` + `\nUpload complete! Uploaded ${BUILD_PATH} and ${SOURCE_PATH} to Zapier. If it's a new version, it should now be available in the Zap editor.`, ); } } diff --git a/packages/cli/src/oclif/commands/users/add.js b/packages/cli/src/oclif/commands/users/add.js index b0974e868..165615cde 100644 --- a/packages/cli/src/oclif/commands/users/add.js +++ b/packages/cli/src/oclif/commands/users/add.js @@ -12,7 +12,7 @@ class UsersAddCommand extends ZapierBaseCommand { `About to invite ${cyan(this.args.email)} to ${ this.args.version ? `version ${this.args.version}` : 'all versions' } of your integration. An invite email will be sent. Is that ok?`, - true + true, )) ) { this.log('\ncancelled'); diff --git a/packages/cli/src/oclif/commands/users/get.js b/packages/cli/src/oclif/commands/users/get.js index 3eb88212d..29118cbea 100644 --- a/packages/cli/src/oclif/commands/users/get.js +++ b/packages/cli/src/oclif/commands/users/get.js @@ -17,8 +17,8 @@ class UsersListCommand extends ZapierBaseCommand { this.log( `\n${yellow( - 'Note' - )} that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the \`users:add EMAIL\` command or the web UI).\n` + 'Note', + )} that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the \`users:add EMAIL\` command or the web UI).\n`, ); this.logTable({ @@ -33,10 +33,10 @@ class UsersListCommand extends ZapierBaseCommand { this.log( `\nTo invite users via a link, use the \`${cyan( - 'zapier users:links' + 'zapier users:links', )}\` command. To invite a specific user by email, use the \`${cyan( - 'zapier users:add' - )}\` command.` + 'zapier users:add', + )}\` command.`, ); } } @@ -45,9 +45,9 @@ UsersListCommand.flags = buildFlags({ opts: { format: true } }); UsersListCommand.description = `Get a list of users who have been invited to your integration. Note that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the \`${cyan( - 'zapier users:add' + 'zapier users:add', )}\` command or the web UI). Users who joined by clicking links generated using the \`${cyan( - 'zapier user:links' + 'zapier user:links', )}\` command won't show up here.`; UsersListCommand.aliases = ['users:list']; UsersListCommand.skipValidInstallCheck = true; diff --git a/packages/cli/src/oclif/commands/users/links.js b/packages/cli/src/oclif/commands/users/links.js index 39185e2de..c30975ea6 100644 --- a/packages/cli/src/oclif/commands/users/links.js +++ b/packages/cli/src/oclif/commands/users/links.js @@ -13,13 +13,13 @@ class UsersLinksCommand extends ZapierBaseCommand { this.log( `\nYou can invite users to ${bold( - 'all' - )} versions of your integration using the following link:` + 'all', + )} versions of your integration using the following link:`, ); this.log(`\n${cyan(inviteUrl)}\n`); this.log( - 'You can invite users to a specific integration version using the following links:' + 'You can invite users to a specific integration version using the following links:', ); this.logTable({ rows: Object.entries(versionInviteUrls).map(([version, url]) => ({ @@ -33,7 +33,7 @@ class UsersLinksCommand extends ZapierBaseCommand { }); this.log( - '\nTo invite a specific user by email, use the `zapier users:add` command.' + '\nTo invite a specific user by email, use the `zapier users:add` command.', ); } } diff --git a/packages/cli/src/oclif/commands/users/remove.js b/packages/cli/src/oclif/commands/users/remove.js index 1b7ed70f9..af7d45dab 100644 --- a/packages/cli/src/oclif/commands/users/remove.js +++ b/packages/cli/src/oclif/commands/users/remove.js @@ -10,9 +10,9 @@ class UsersRemoveCommand extends ZapierBaseCommand { !this.flags.force && !(await this.confirm( `About to revoke access to ${cyan( - this.args.email + this.args.email, )}. They won't be able to see your app in the editor and their Zaps will stop working. Are you sure?`, - true + true, )) ) { this.log('\ncancelled'); diff --git a/packages/cli/src/oclif/commands/validate.js b/packages/cli/src/oclif/commands/validate.js index ea558d7b3..22d90fef9 100644 --- a/packages/cli/src/oclif/commands/validate.js +++ b/packages/cli/src/oclif/commands/validate.js @@ -29,7 +29,7 @@ class ValidateCommand extends BaseCommand { if (newErrors.length) { this.log( - 'Your integration is structurally invalid. Address concerns and run this command again.' + 'Your integration is structurally invalid. Address concerns and run this command again.', ); process.exitCode = 1; } else { @@ -41,8 +41,8 @@ class ValidateCommand extends BaseCommand { if (process.exitCode === 1) { this.log( colors.grey( - '\nSkipping integration checks because schema did not validate.' - ) + '\nSkipping integration checks because schema did not validate.', + ), ); } return; diff --git a/packages/cli/src/oclif/commands/versions.js b/packages/cli/src/oclif/commands/versions.js index 59d8afb1a..b18d17f77 100644 --- a/packages/cli/src/oclif/commands/versions.js +++ b/packages/cli/src/oclif/commands/versions.js @@ -50,7 +50,7 @@ class VersionCommand extends BaseCommand { if (versions.map((v) => v.user_count).filter((c) => c === null).length) { this.warn( - 'Some user counts are still being calculated - run this command again in ~10 seconds (or longer if your integration has lots of users).' + 'Some user counts are still being calculated - run this command again in ~10 seconds (or longer if your integration has lots of users).', ); } } diff --git a/packages/cli/src/oclif/hooks/checkValidNodeVersion.js b/packages/cli/src/oclif/hooks/checkValidNodeVersion.js index 0a9633a44..d7dfdb443 100644 --- a/packages/cli/src/oclif/hooks/checkValidNodeVersion.js +++ b/packages/cli/src/oclif/hooks/checkValidNodeVersion.js @@ -5,7 +5,7 @@ const { LAMBDA_VERSION } = require('../../constants'); module.exports = function () { if (!isValidNodeVersion()) { this.error( - `Requires node version >= ${LAMBDA_VERSION}, found ${process.versions.node}. Please upgrade Node.js.` + `Requires node version >= ${LAMBDA_VERSION}, found ${process.versions.node}. Please upgrade Node.js.`, ); } }; diff --git a/packages/cli/src/oclif/hooks/deprecated.js b/packages/cli/src/oclif/hooks/deprecated.js index f77429756..dc0b1caad 100644 --- a/packages/cli/src/oclif/hooks/deprecated.js +++ b/packages/cli/src/oclif/hooks/deprecated.js @@ -11,7 +11,7 @@ module.exports = function (options) { this.warn( `The \`${options.id}\` command is deprecated. Use the \`${ deprecatedCommands[options.id] - }\` command instead.` + }\` command instead.`, ); console.log(); } diff --git a/packages/cli/src/oclif/hooks/getAppRegistrationFieldChoices.js b/packages/cli/src/oclif/hooks/getAppRegistrationFieldChoices.js index e29c69389..8c2da097c 100644 --- a/packages/cli/src/oclif/hooks/getAppRegistrationFieldChoices.js +++ b/packages/cli/src/oclif/hooks/getAppRegistrationFieldChoices.js @@ -13,7 +13,7 @@ module.exports = async function (options) { formFields = await callAPI('/apps/fields-choices', { skipDeployKey: true }); } catch (e) { this.error( - `Unable to connect to Zapier API. Please check your connection and try again. ${e}` + `Unable to connect to Zapier API. Please check your connection and try again. ${e}`, ); } @@ -28,17 +28,17 @@ module.exports = async function (options) { if (cmd && cmd.flags) { if (cmd.flags.audience) { cmd.flags.audience.options = formFields.intention.map( - (audienceOption) => audienceOption.value + (audienceOption) => audienceOption.value, ); } if (cmd.flags.role) { cmd.flags.role.options = formFields.role.map( - (roleOption) => roleOption.value + (roleOption) => roleOption.value, ); } if (cmd.flags.category) { cmd.flags.category.options = formFields.app_category.map( - (categoryOption) => categoryOption.value + (categoryOption) => categoryOption.value, ); } } diff --git a/packages/cli/src/oclif/hooks/versionInfo.js b/packages/cli/src/oclif/hooks/versionInfo.js index bb64cbb25..d89ea55f2 100644 --- a/packages/cli/src/oclif/hooks/versionInfo.js +++ b/packages/cli/src/oclif/hooks/versionInfo.js @@ -18,7 +18,7 @@ module.exports = (options) => { `* CLI version: ${options.config.version}`, `* Node.js version: ${process.version}`, `* OS info: ${options.config.platform}-${options.config.arch}`, - ].join('\n') + ].join('\n'), ); try { @@ -28,7 +28,7 @@ module.exports = (options) => { const maybeCoreDepVersion = get(pJson, ['dependencies', PLATFORM_PACKAGE]); if (maybeCoreDepVersion) { console.log( - `* \`${PLATFORM_PACKAGE}\` dependency: ${maybeCoreDepVersion}` + `* \`${PLATFORM_PACKAGE}\` dependency: ${maybeCoreDepVersion}`, ); } } catch {} diff --git a/packages/cli/src/smoke-tests/smoke-tests.js b/packages/cli/src/smoke-tests/smoke-tests.js index f2d219d44..c62e9921a 100644 --- a/packages/cli/src/smoke-tests/smoke-tests.js +++ b/packages/cli/src/smoke-tests/smoke-tests.js @@ -22,7 +22,7 @@ const setupZapierRC = () => { } else if (process.env.ZAPIER_DEPLOY_KEY) { fs.writeFileSync( rcPath, - JSON.stringify({ deployKey: process.env.ZAPIER_DEPLOY_KEY }) + JSON.stringify({ deployKey: process.env.ZAPIER_DEPLOY_KEY }), ); hasRC = true; } @@ -98,7 +98,7 @@ describe('smoke tests - setup will take some time', function () { context.workdir, 'node_modules', '.bin', - 'zapier' + 'zapier', ); }); @@ -182,12 +182,12 @@ describe('smoke tests - setup will take some time', function () { newAppDir, 'test', 'triggers', - 'neat.test.js' + 'neat.test.js', ); fs.existsSync(newTriggerTest).should.be.true(); const pkg = JSON.parse( - fs.readFileSync(appPackageJson, { encoding: 'utf8' }) + fs.readFileSync(appPackageJson, { encoding: 'utf8' }), ); pkg.name.should.containEql('scaffold-town'); }); @@ -196,7 +196,7 @@ describe('smoke tests - setup will take some time', function () { runCommand( context.cliBin, ['init', 'scaffold-town-ts', '-t', 'typescript'], - { cwd: context.workdir } + { cwd: context.workdir }, ); const newAppDir = path.join(context.workdir, 'scaffold-town-ts'); @@ -219,12 +219,12 @@ describe('smoke tests - setup will take some time', function () { 'src', 'test', 'triggers', - 'neat.test.ts' + 'neat.test.ts', ); fs.existsSync(newTriggerTest).should.be.true(); const pkg = JSON.parse( - fs.readFileSync(appPackageJson, { encoding: 'utf8' }) + fs.readFileSync(appPackageJson, { encoding: 'utf8' }), ); pkg.name.should.containEql('scaffold-town'); }); @@ -298,7 +298,7 @@ describe('smoke tests - setup will take some time', function () { 'CLIENT_SECRET=asdf\n' + 'authData_access_token=a_token\n' + 'authData_refresh_token=a_refresh_token\n' + - "authData_access_token='a_token'\n" + "authData_access_token='a_token'\n", ); }, }, diff --git a/packages/cli/src/tests/baseCommand.js b/packages/cli/src/tests/baseCommand.js index 3c2048fd0..4cf2e321a 100644 --- a/packages/cli/src/tests/baseCommand.js +++ b/packages/cli/src/tests/baseCommand.js @@ -83,16 +83,16 @@ describe('BaseCommand', () => { describe('WithArgsCommand', () => { it('should error out with missing args', async () => { const { error } = await captureOutput(async () => - WithArgsCommand.run([]) + WithArgsCommand.run([]), ); should(error.message).containEql( - 'Missing 1 required arg:\nname name is a required argument\nSee more help with --help' + 'Missing 1 required arg:\nname name is a required argument\nSee more help with --help', ); }); it('should not error out without missing args', async () => { const { stdout, error } = await captureOutput(async () => - WithArgsCommand.run(['a']) + WithArgsCommand.run(['a']), ); should(error).equal(undefined); should(stdout).startWith(MESSAGE); @@ -100,7 +100,7 @@ describe('BaseCommand', () => { it('should not error out with full args', async () => { const { stdout, error } = await captureOutput(async () => - WithArgsCommand.run(['a', 'b']) + WithArgsCommand.run(['a', 'b']), ); should(error).equal(undefined); should(stdout).startWith(MESSAGE); @@ -110,7 +110,7 @@ describe('BaseCommand', () => { describe('WithFlagsCommand', () => { it('should detect flags', async () => { const { stdout } = await captureOutput(async () => - WithFlagsCommand.run(['--force', '--file', 'path/to/file']) + WithFlagsCommand.run(['--force', '--file', 'path/to/file']), ); should(stdout).containEql('--force is set\n--file is: path/to/file\n'); }); @@ -124,7 +124,7 @@ describe('BaseCommand', () => { it('should not log in json mode', async () => { const { stdout } = await captureOutput(async () => - LogCommand.run(['--format', 'json', '--skipTable']) + LogCommand.run(['--format', 'json', '--skipTable']), ); should(stdout).equal(''); }); @@ -143,7 +143,7 @@ describe('BaseCommand', () => { it('should print a plain table', async () => { const { stdout } = await captureOutput(async () => - LogCommand.run(['--format', 'plain']) + LogCommand.run(['--format', 'plain']), ); should(stdout).containEql('Contact ID'); @@ -158,7 +158,7 @@ describe('BaseCommand', () => { it('should print a row table', async () => { const { stdout } = await captureOutput(async () => - LogCommand.run(['--format', 'row']) + LogCommand.run(['--format', 'row']), ); should(stdout).containEql('Contact ID'); @@ -174,7 +174,7 @@ describe('BaseCommand', () => { it('should print valid transformed json', async () => { const { stdout } = await captureOutput(async () => - LogCommand.run(['--format', 'json']) + LogCommand.run(['--format', 'json']), ); should(stdout).containEql('Contact ID'); @@ -189,7 +189,7 @@ describe('BaseCommand', () => { it('should print valid raw json', async () => { const { stdout } = await captureOutput(async () => - LogCommand.run(['--format', 'raw']) + LogCommand.run(['--format', 'raw']), ); should(stdout).not.containEql('Contact ID'); @@ -207,7 +207,7 @@ describe('BaseCommand', () => { describe('NoFormatCommand', () => { it('should log without format flags', async () => { const { stdout } = await captureOutput(async () => - NoFormatCommand.run([]) + NoFormatCommand.run([]), ); should(stdout).startWith(MESSAGE); }); diff --git a/packages/cli/src/tests/fixtures/registerFieldChoices.js b/packages/cli/src/tests/fixtures/registerFieldChoices.js index afa5cbfb5..da6926833 100644 --- a/packages/cli/src/tests/fixtures/registerFieldChoices.js +++ b/packages/cli/src/tests/fixtures/registerFieldChoices.js @@ -2,13 +2,11 @@ module.exports = { intention: [ { value: 'global', - name: - "Public: I'm evaluating making my app available to the entire Zapier ecosystem", + name: "Public: I'm evaluating making my app available to the entire Zapier ecosystem", }, { value: 'private', - name: - "Private: I'm building an integration for personal use or to explore the Zapier platform", + name: "Private: I'm building an integration for personal use or to explore the Zapier platform", }, ], role: [ diff --git a/packages/cli/src/tests/register.test.js b/packages/cli/src/tests/register.test.js index 3d795b8cd..343aba3b5 100644 --- a/packages/cli/src/tests/register.test.js +++ b/packages/cli/src/tests/register.test.js @@ -51,7 +51,7 @@ describe('RegisterCommand', () => { await captureOutput(async function () { const { error } = await runCommand(['register', 't']); expect(error.message).to.contain( - `Please provide a title that is ${MIN_TITLE_LENGTH} characters or more.` + `Please provide a title that is ${MIN_TITLE_LENGTH} characters or more.`, ); }); }); @@ -68,7 +68,7 @@ describe('RegisterCommand', () => { 'Cupidatat non elit non enim enim cupidatat ea in consequat exercitation do nisi occaecat amet id deserunt nostrud quis aliqua id fugiat sit elit.', ]); expect(error.message).to.contain( - `Please provide a description that is ${MAX_DESCRIPTION_LENGTH} characters or less.` + `Please provide a description that is ${MAX_DESCRIPTION_LENGTH} characters or less.`, ); }); }); @@ -85,7 +85,7 @@ describe('RegisterCommand', () => { 'invalidRole', ]); expect(error.message).to.contain( - 'invalidRole is not a valid value for role' + 'invalidRole is not a valid value for role', ); }); }); @@ -100,7 +100,7 @@ describe('RegisterCommand', () => { 'invalidCategory', ]); expect(error.message).to.contain( - 'invalidCategory is not a valid value for category' + 'invalidCategory is not a valid value for category', ); }); }); @@ -115,7 +115,7 @@ describe('RegisterCommand', () => { 'invalidAudience', ]); expect(error.message).to.contain( - 'invalidAudience is not a valid value for audience' + 'invalidAudience is not a valid value for audience', ); }); }); @@ -152,7 +152,7 @@ describe('RegisterCommand', () => { ]); expect(error.message).to.contain( - 'invalidAudience is not a valid value for audience' + 'invalidAudience is not a valid value for audience', ); }); }); @@ -180,7 +180,7 @@ describe('RegisterCommand', () => { fs.writeFileSync( APP_RC_FILE, - `{"id":${privateApp.id},"key":"App${privateApp.id}"}` + `{"id":${privateApp.id},"key":"App${privateApp.id}"}`, ); it('zapier register should successfully register an app with all data provided', async function () { @@ -204,7 +204,7 @@ describe('RegisterCommand', () => { ]); expect(error.message).to.contain( - 'zapier register --yes should update an app without prompts' + 'zapier register --yes should update an app without prompts', ); }); }); @@ -230,7 +230,7 @@ describe('RegisterCommand', () => { ]); expect(error.message).to.contain( - "You can't edit settings for this integration. To edit your integration details on Zapier's public app directory, email partners@zapier.com." + "You can't edit settings for this integration. To edit your integration details on Zapier's public app directory, email partners@zapier.com.", ); }); }); diff --git a/packages/cli/src/tests/utils/ast.js b/packages/cli/src/tests/utils/ast.js index b5f3aeda2..08c5f5eeb 100644 --- a/packages/cli/src/tests/utils/ast.js +++ b/packages/cli/src/tests/utils/ast.js @@ -30,12 +30,12 @@ describe('ast (JS)', () => { const result = importActionInJsApp( sampleExportVarIndexJs, 'getThing', - './a/b/c' + './a/b/c', ); should( result.includes( - 'const BlahTrigger = require(\'./triggers/blah\')\nconst getThing = require("./a/b/c");' - ) + 'const BlahTrigger = require(\'./triggers/blah\')\nconst getThing = require("./a/b/c");', + ), ).be.true(); }); @@ -47,10 +47,10 @@ describe('ast (JS)', () => { .slice(2) .join('\n'), 'getThing', - './a/b/c' + './a/b/c', ); should( - result.startsWith('// comment!\nconst getThing = require("./a/b/c");') + result.startsWith('// comment!\nconst getThing = require("./a/b/c");'), ).be.true(); }); @@ -58,10 +58,10 @@ describe('ast (JS)', () => { const result = importActionInJsApp( sampleExportVarIndexJs, 'CryptoCreate', - './a/b/c' + './a/b/c', ); should( - result.includes("const CryptoCreate = require('./a/b/c')") + result.includes("const CryptoCreate = require('./a/b/c')"), ).be.false(); }); @@ -69,7 +69,7 @@ describe('ast (JS)', () => { const result = importActionInJsApp( sampleExportVarIndexJs, 'Crypto', - './a/b/c' + './a/b/c', ); should(result.includes('const Crypto = require("./a/b/c");')).be.true(); }); @@ -92,10 +92,10 @@ describe('ast (JS)', () => { const firstIndex = codeByLine.indexOf('triggers: {'); // assertions about what comes in the trigger property should(codeByLine.indexOf('[BlahTrigger.key]: BlahTrigger,')).eql( - firstIndex + 1 + firstIndex + 1, ); should(codeByLine.indexOf('[getThing.key]: getThing')).eql( - firstIndex + 2 + firstIndex + 2, ); }); @@ -103,7 +103,7 @@ describe('ast (JS)', () => { const result = registerActionInJsApp( codeStr, 'searches', - 'findThing' + 'findThing', ); should(countOccurrences(result, 'triggers:')).eql(1); should(countOccurrences(result, 'searches:')).eql(1); @@ -112,7 +112,7 @@ describe('ast (JS)', () => { const firstIndex = codeByLine.indexOf('searches: {'); // assertions about what comes in the searches property should(codeByLine.indexOf('[findThing.key]: findThing')).eql( - firstIndex + 1 + firstIndex + 1, ); should(codeByLine[firstIndex + 2]).eql('}'); }); @@ -124,7 +124,7 @@ describe('ast (JS)', () => { const result = registerActionInJsApp( sampleLegacyAppIndexJs, 'triggers', - 'getThing' + 'getThing', ); should(countOccurrences(result, 'triggers:')).eql(2); should(countOccurrences(result, 'searches:')).eql(2); @@ -134,14 +134,14 @@ describe('ast (JS)', () => { // find the second occurrence, the one that's not in the "legacy" property const operativeIndex = codeByLine.indexOf( 'triggers: {', - codeByLine.indexOf('triggers: {') + 1 + codeByLine.indexOf('triggers: {') + 1, ); should( - codeByLine.indexOf('[businessTrigger.key]: businessTrigger,') + codeByLine.indexOf('[businessTrigger.key]: businessTrigger,'), ).eql(operativeIndex + 1); should(codeByLine.indexOf('[getThing.key]: getThing')).eql( - operativeIndex + 2 + operativeIndex + 2, ); should(codeByLine[operativeIndex + 3]).eql('},'); }); @@ -150,7 +150,7 @@ describe('ast (JS)', () => { const result = registerActionInJsApp( sampleLegacyAppIndexJs, 'searches', - 'findThing' + 'findThing', ); should(countOccurrences(result, 'searches:')).eql(2); @@ -158,7 +158,7 @@ describe('ast (JS)', () => { // find the second occurrence, the one that's not in the "legacy" property const operativeIndex = codeByLine.indexOf('searches: {'); should(codeByLine.indexOf('[findThing.key]: findThing')).eql( - operativeIndex + 1 + operativeIndex + 1, ); should(codeByLine[operativeIndex + 2]).eql('},'); }); @@ -167,7 +167,7 @@ describe('ast (JS)', () => { const result = registerActionInJsApp( sampleLegacyAppIndexJs, 'resources', - 'findThing' + 'findThing', ); should(countOccurrences(result, 'triggers:')).eql(2); should(countOccurrences(result, 'searches:')).eql(2); @@ -177,7 +177,7 @@ describe('ast (JS)', () => { const firstIndex = codeByLine.indexOf('resources: {'); // assertions about what comes in the trigger property should(codeByLine.indexOf('[findThing.key]: findThing')).eql( - firstIndex + 1 + firstIndex + 1, ); should(codeByLine[firstIndex + 2]).eql('}'); }); @@ -212,10 +212,10 @@ describe('ast (JS)', () => { ({ title, input, error, prop = 'triggers', varName = 'newThing' }) => { it(`should ${title}`, () => { should(() => registerActionInJsApp(input, prop, varName)).throw( - new RegExp(error) + new RegExp(error), ); }); - } + }, ); }); }); @@ -253,10 +253,10 @@ describe('ast (TS)', () => { const codeByLine = result.split('\n').map((x) => x.trim()); const firstIndex = codeByLine.indexOf('triggers: {'); should(codeByLine.indexOf('[BlahTrigger.key]: BlahTrigger,')).eql( - firstIndex + 1 + firstIndex + 1, ); should(codeByLine.indexOf('[getThing.key]: getThing')).eql( - firstIndex + 2 + firstIndex + 2, ); }); @@ -264,7 +264,7 @@ describe('ast (TS)', () => { const result = registerActionInTsApp( codeStr, 'searches', - 'findThing' + 'findThing', ); should(countOccurrences(result, 'triggers:')).eql(1); should(countOccurrences(result, 'searches:')).eql(1); @@ -273,7 +273,7 @@ describe('ast (TS)', () => { const firstIndex = codeByLine.indexOf('searches: {'); // assertions about what comes in the searches property should(codeByLine.indexOf('[findThing.key]: findThing')).eql( - firstIndex + 1 + firstIndex + 1, ); should(codeByLine[firstIndex + 2]).eql('}'); }); diff --git a/packages/cli/src/tests/utils/build.js b/packages/cli/src/tests/utils/build.js index 2ced5f8fd..d71818ce0 100644 --- a/packages/cli/src/tests/utils/build.js +++ b/packages/cli/src/tests/utils/build.js @@ -17,7 +17,7 @@ describe('build (runs slowly)', function () { tmpDir = getNewTempDirPath(); await copyDir( path.resolve(__dirname, '../../../../../example-apps/typescript'), - tmpDir + tmpDir, ); // When releasing, the core version the example apps points can be still @@ -25,7 +25,7 @@ describe('build (runs slowly)', function () { corePackage = await npmPackCore(); const appPackageJsonPath = path.join(tmpDir, 'package.json'); const appPackageJson = JSON.parse( - fs.readFileSync(appPackageJsonPath, { encoding: 'utf8' }) + fs.readFileSync(appPackageJsonPath, { encoding: 'utf8' }), ); appPackageJson.dependencies[PLATFORM_PACKAGE] = corePackage.path; fs.writeFileSync(appPackageJsonPath, JSON.stringify(appPackageJson)); @@ -110,7 +110,7 @@ describe('build (runs slowly)', function () { fs.outputFileSync( path.join(tmpProjectDir, 'zapierwrapper.js'), - "console.log('hello!')" + "console.log('hello!')", ); fs.outputFileSync(tmpIndexPath, "console.log('hello!')"); fs.chmodSync(tmpIndexPath, 0o700); @@ -126,20 +126,20 @@ describe('build (runs slowly)', function () { files.length.should.equal(2); const indexFile = files.find( - ({ path: filePath }) => filePath === 'index.js' + ({ path: filePath }) => filePath === 'index.js', ); should.exist(indexFile); (indexFile.mode & 0o400).should.be.above( 0, - 'no read permission for owner' + 'no read permission for owner', ); (indexFile.mode & 0o040).should.be.above( 0, - 'no read permission for group' + 'no read permission for group', ); (indexFile.mode & 0o004).should.be.above( 0, - 'no read permission for public' + 'no read permission for public', ); }); }); @@ -152,7 +152,7 @@ describe('build (runs slowly)', function () { fs.outputFileSync( path.join(tmpProjectDir, 'zapierwrapper.js'), - "console.log('hello!')" + "console.log('hello!')", ); fs.outputFileSync(tmpIndexPath, "console.log('hello!')"); fs.chmodSync(tmpIndexPath, 0o700); @@ -167,20 +167,20 @@ describe('build (runs slowly)', function () { files.length.should.equal(2); const indexFile = files.find( - ({ path: filePath }) => filePath === 'index.js' + ({ path: filePath }) => filePath === 'index.js', ); should.exist(indexFile); (indexFile.mode & 0o400).should.be.above( 0, - 'no read permission for owner' + 'no read permission for owner', ); (indexFile.mode & 0o040).should.be.above( 0, - 'no read permission for group' + 'no read permission for group', ); (indexFile.mode & 0o004).should.be.above( 0, - 'no read permission for public' + 'no read permission for public', ); }); }); @@ -195,7 +195,7 @@ describe('build (runs slowly)', function () { fs.outputFileSync( path.join(tmpProjectDir, 'zapierwrapper.js'), - "console.log('hello!')" + "console.log('hello!')", ); fs.outputFileSync(tmpIndexPath, "console.log('hello!')"); fs.outputFileSync(tmpReadmePath, 'README'); @@ -212,24 +212,24 @@ describe('build (runs slowly)', function () { files.length.should.equal(4); const indexFile = files.find( - ({ path: filePath }) => filePath === 'index.js' + ({ path: filePath }) => filePath === 'index.js', ); should.exist(indexFile); (indexFile.mode & 0o400).should.be.above( 0, - 'no read permission for owner' + 'no read permission for owner', ); (indexFile.mode & 0o040).should.be.above( 0, - 'no read permission for group' + 'no read permission for group', ); (indexFile.mode & 0o004).should.be.above( 0, - 'no read permission for public' + 'no read permission for public', ); const readmeFile = files.find( - ({ path: filePath }) => filePath === 'README.md' + ({ path: filePath }) => filePath === 'README.md', ); should.exist(readmeFile); }); @@ -250,7 +250,7 @@ describe('build (runs slowly)', function () { fs.outputFileSync( path.join(tmpProjectDir, 'zapierwrapper.js'), - "console.log('hello!')" + "console.log('hello!')", ); fs.outputFileSync(tmpIndexPath, "console.log('hello!')"); fs.chmodSync(tmpIndexPath, 0o700); @@ -271,32 +271,32 @@ describe('build (runs slowly)', function () { files.length.should.equal(4); const indexFile = files.find( - ({ path: filePath }) => filePath === 'index.js' + ({ path: filePath }) => filePath === 'index.js', ); should.exist(indexFile); const readmeFile = files.find( - ({ path: filePath }) => filePath === 'README.md' + ({ path: filePath }) => filePath === 'README.md', ); should.exist(readmeFile); const gitIgnoreFile = files.find( - ({ path: filePath }) => filePath === '.gitignore' + ({ path: filePath }) => filePath === '.gitignore', ); should.not.exist(gitIgnoreFile); const testLogFile = files.find( - ({ path: filePath }) => filePath === 'test.log' + ({ path: filePath }) => filePath === 'test.log', ); should.not.exist(testLogFile); const DSStoreFile = files.find( - ({ path: filePath }) => filePath === '.DS_Store' + ({ path: filePath }) => filePath === '.DS_Store', ); should.not.exist(DSStoreFile); const environmentFile = files.find( - ({ path: filePath }) => filePath === '.environment' + ({ path: filePath }) => filePath === '.environment', ); should.not.exist(environmentFile); }); @@ -338,7 +338,7 @@ describe('build in workspaces', function () { name: 'my-monorepo', workspaces: ['packages/*'], private: true, - }) + }), ); const defaultIndexJs = `module.exports = { @@ -349,7 +349,7 @@ describe('build in workspaces', function () { // First integration: app-1 fs.outputFileSync( path.join(tmpDir, 'packages', 'app-1', 'index.js'), - defaultIndexJs + defaultIndexJs, ); fs.outputFileSync( path.join(tmpDir, 'packages', 'app-1', 'package.json'), @@ -362,13 +362,13 @@ describe('build in workspaces', function () { 'zapier-platform-core': '15.5.1', }, private: true, - }) + }), ); // Second integration: app-2 fs.outputFileSync( path.join(tmpDir, 'packages', 'app-2', 'index.js'), - defaultIndexJs + defaultIndexJs, ); fs.outputFileSync( path.join(tmpDir, 'packages', 'app-2', 'package.json'), @@ -381,7 +381,7 @@ describe('build in workspaces', function () { 'zapier-platform-core': '15.5.1', }, private: true, - }) + }), ); runCommand('yarn', ['install'], { cwd: tmpDir }); @@ -407,10 +407,10 @@ describe('build in workspaces', function () { // Make sure the zapier-platform-core dependency is installed in the root // project directory fs.existsSync( - path.join(tmpDir, 'node_modules', 'zapier-platform-core') + path.join(tmpDir, 'node_modules', 'zapier-platform-core'), ).should.be.true(); fs.existsSync( - path.join(workspaceDir, 'node_modules', 'zapier-platform-core') + path.join(workspaceDir, 'node_modules', 'zapier-platform-core'), ).should.be.false(); fs.ensureDirSync(path.dirname(zipPath)); @@ -424,7 +424,7 @@ describe('build in workspaces', function () { skipValidation: true, printProgress: false, checkOutdated: false, - } + }, ); await decompress(zipPath, unzipPath); @@ -434,26 +434,26 @@ describe('build in workspaces', function () { unzipPath, 'node_modules', 'zapier-platform-core', - 'package.json' - ) - ) + 'package.json', + ), + ), ); corePackageJson.version.should.equal('15.5.1'); const uuidPackageJson = JSON.parse( fs.readFileSync( - path.join(unzipPath, 'node_modules', 'uuid', 'package.json') - ) + path.join(unzipPath, 'node_modules', 'uuid', 'package.json'), + ), ); uuidPackageJson.version.should.equal('8.3.2'); // Make sure node_modules/app-1 and node_modules/app-2 are not included // in the build fs.existsSync( - path.join(unzipPath, 'node_modules', 'app-1') + path.join(unzipPath, 'node_modules', 'app-1'), ).should.be.false(); fs.existsSync( - path.join(unzipPath, 'node_modules', 'app-2') + path.join(unzipPath, 'node_modules', 'app-2'), ).should.be.false(); }); @@ -465,10 +465,10 @@ describe('build in workspaces', function () { // Make sure the zapier-platform-core dependency is installed in the root // project directory fs.existsSync( - path.join(tmpDir, 'node_modules', 'zapier-platform-core') + path.join(tmpDir, 'node_modules', 'zapier-platform-core'), ).should.be.true(); fs.existsSync( - path.join(workspaceDir, 'node_modules', 'zapier-platform-core') + path.join(workspaceDir, 'node_modules', 'zapier-platform-core'), ).should.be.false(); fs.ensureDirSync(path.dirname(zipPath)); @@ -482,7 +482,7 @@ describe('build in workspaces', function () { skipValidation: true, printProgress: false, checkOutdated: false, - } + }, ); await decompress(zipPath, unzipPath); @@ -492,26 +492,26 @@ describe('build in workspaces', function () { unzipPath, 'node_modules', 'zapier-platform-core', - 'package.json' - ) - ) + 'package.json', + ), + ), ); corePackageJson.version.should.equal('15.5.1'); const uuidPackageJson = JSON.parse( fs.readFileSync( - path.join(unzipPath, 'node_modules', 'uuid', 'package.json') - ) + path.join(unzipPath, 'node_modules', 'uuid', 'package.json'), + ), ); uuidPackageJson.version.should.equal('9.0.1'); // Make sure node_modules/app-1 and node_modules/app-2 are not included // in the build fs.existsSync( - path.join(unzipPath, 'node_modules', 'app-1') + path.join(unzipPath, 'node_modules', 'app-1'), ).should.be.false(); fs.existsSync( - path.join(unzipPath, 'node_modules', 'app-2') + path.join(unzipPath, 'node_modules', 'app-2'), ).should.be.false(); }); }); diff --git a/packages/cli/src/tests/utils/changelog.js b/packages/cli/src/tests/utils/changelog.js index fe747927e..cf0ac809f 100644 --- a/packages/cli/src/tests/utils/changelog.js +++ b/packages/cli/src/tests/utils/changelog.js @@ -38,7 +38,7 @@ describe('changelog utils', () => { '* Minor docs fixes.\n' + '# 0.0.1\n' + 'initial release\n\n' + - 'just for internal testing\n\n' + 'just for internal testing\n\n', ); }); @@ -60,14 +60,14 @@ describe('changelog utils', () => { should(appMetadata).equal(undefined); should(issueMetadata).equal(undefined); changelog.should.equal( - '### Changed\n\nSwitch changelog format\n### Security\nUpdate dependencies\n### Fixes\nNo code, no issue' + '### Changed\n\nSwitch changelog format\n### Security\nUpdate dependencies\n### Fixes\nNo code, no issue', ); }); it('should find changelog for 1.0.0', () => changelogUtil.getVersionChangelog('1.0.0', appDir).then((log) => { log.changelog.should.eql( - '* Removing beta "label".\n* Minor docs fixes.' + '* Removing beta "label".\n* Minor docs fixes.', ); })); @@ -109,7 +109,7 @@ describe('changelog utils', () => { '4. Add trigger/new_contact #10\n' + '5. New action! create/add_contact\n' + 'However, we also addressed fixed open issues!\n' + - '- Fix #123 and an issue with create/send_message' + '- Fix #123 and an issue with create/send_message', ); appMetadata.should.deepEqual([ { diff --git a/packages/cli/src/tests/utils/check-missing-app-info.js b/packages/cli/src/tests/utils/check-missing-app-info.js index 6009fab50..1af3d0297 100644 --- a/packages/cli/src/tests/utils/check-missing-app-info.js +++ b/packages/cli/src/tests/utils/check-missing-app-info.js @@ -14,8 +14,8 @@ describe('check missing required app info', () => { }; should(() => checkMissingAppInfo(app)).throw( new Error( - `Your integration is missing required info (category, audience, role). Please, run "zapier register" to add it.` - ) + `Your integration is missing required info (category, audience, role). Please, run "zapier register" to add it.`, + ), ); }); it('should return false when all the required app info are set', () => { diff --git a/packages/cli/src/tests/utils/convert.js b/packages/cli/src/tests/utils/convert.js index 6e77c264d..45ea87670 100644 --- a/packages/cli/src/tests/utils/convert.js +++ b/packages/cli/src/tests/utils/convert.js @@ -307,15 +307,15 @@ describe('convert', () => { tempAppDir, 'node_modules', 'zapier-platform-core', - 'index.js' + 'index.js', ), - `module.exports = {version: "${visualAppDefinition.platformVersion}"}` + `module.exports = {version: "${visualAppDefinition.platformVersion}"}`, ); const pkg = require(path.join(tempAppDir, 'package.json')); should(pkg.name).eql('my-w-istia-app'); should(pkg.dependencies['zapier-platform-core']).eql( - visualAppDefinition.platformVersion + visualAppDefinition.platformVersion, ); should(pkg.version).eql('1.0.2'); @@ -339,11 +339,11 @@ describe('convert', () => { should(idxFile.includes("require('./package.json').version")).be.true(); should( - idxFile.includes("require('zapier-platform-core').version") + idxFile.includes("require('zapier-platform-core').version"), ).be.true(); should(idxFile.includes('source:')).be.false(); should( - idxFile.includes('const beforeRequest = async(z, bundle)') + idxFile.includes('const beforeRequest = async(z, bundle)'), ).be.false(); // requiring the file ensures the js is syntactically valid @@ -355,11 +355,11 @@ describe('convert', () => { const createFile = readTempFile('creates/create_project.js'); should(createFile.includes('source:')).be.false(); should( - createFile.includes('const inputFields = async (z, bundle)') + createFile.includes('const inputFields = async (z, bundle)'), ).be.true(); should(createFile.includes('inputFields0')).be.false(); should( - createFile.includes('const inputFields1 = async (z, bundle)') + createFile.includes('const inputFields1 = async (z, bundle)'), ).be.true(); // renderStep -> perform etc @@ -372,19 +372,19 @@ describe('convert', () => { const authenticationFile = readTempFile('authentication.js'); should(authenticationFile.includes('source:')).be.false(); should( - authenticationFile.includes('const test = async (z, bundle)') + authenticationFile.includes('const test = async (z, bundle)'), ).be.true(); should( authenticationFile.includes( - 'const refreshAccessToken = async (z, bundle)' - ) + 'const refreshAccessToken = async (z, bundle)', + ), ).be.true(); // renderHydrators const hydratorsFile = readTempFile('hydrators.js'); should(hydratorsFile.includes('source:')).be.false(); should( - hydratorsFile.includes('getMovieDetails = async (z, bundle)') + hydratorsFile.includes('getMovieDetails = async (z, bundle)'), ).be.true(); }); @@ -408,7 +408,7 @@ describe('convert', () => { const authenticationFile = readTempFile('authentication.js'); should( - authenticationFile.includes('const test = async (z, bundle)') + authenticationFile.includes('const test = async (z, bundle)'), ).be.true(); should(authenticationFile.includes('{ bad code }')).be.true(); }); @@ -441,7 +441,7 @@ describe('convert', () => { const hydratorsFile = readTempFile('hydrators.js'); should( - hydratorsFile.includes('getMovieDetails = async (z, bundle)') + hydratorsFile.includes('getMovieDetails = async (z, bundle)'), ).be.true(); should(hydratorsFile.includes('{ bad code }')).be.true(); }); @@ -459,7 +459,7 @@ describe('convert', () => { const createFile = readTempFile('creates/create_project.js'); should( - createFile.includes('const inputFields = async (z, bundle)') + createFile.includes('const inputFields = async (z, bundle)'), ).be.true(); should(createFile.includes("[{ source: 'not a function' }]")).be.true(); }); diff --git a/packages/cli/src/tests/utils/display.js b/packages/cli/src/tests/utils/display.js index 8445d745b..cc2d59cae 100644 --- a/packages/cli/src/tests/utils/display.js +++ b/packages/cli/src/tests/utils/display.js @@ -17,7 +17,7 @@ describe('display', () => { ['ID', 'id'], ['Title', 'title'], ['Missing', 'missing'], - ] + ], ); // Verify presence @@ -54,7 +54,7 @@ describe('display', () => { ['ID', 'id'], ['Title', 'title'], ['Missing', 'missing'], - ] + ], ); // Verify presence diff --git a/packages/cli/src/tests/utils/files.js b/packages/cli/src/tests/utils/files.js index 19c48179b..33030b79e 100644 --- a/packages/cli/src/tests/utils/files.js +++ b/packages/cli/src/tests/utils/files.js @@ -32,7 +32,7 @@ describe('files', () => { files.readFile(fileName).then((buf) => { buf.toString().should.equal(data); done(); - }) + }), ) .catch(done); }); @@ -73,19 +73,19 @@ describe('files', () => { await files.copyDir(srcDir, dstDir); should.equal( await files.readFileStr(path.join(dstDir, '01.txt')), - 'ch 1' + 'ch 1', ); should.equal( await files.readFileStr(path.join(dstDir, '03', '03.txt')), - 'ch 3' + 'ch 3', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'fig.png')), - 'png data' + 'png data', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'photo.jpg')), - 'photo data' + 'photo data', ); }); @@ -93,23 +93,23 @@ describe('files', () => { await files.copyDir(srcDir, dstDir, { clobber: true }); should.equal( await files.readFileStr(path.join(dstDir, '02.txt')), - 'chapter 2' + 'chapter 2', ); should.equal( await files.readFileStr(path.join(dstDir, '03', '03.txt')), - 'chapter 3' + 'chapter 3', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'cover.jpg')), - 'image data' + 'image data', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'fig.png')), - 'png data' + 'png data', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'photo.jpg')), - 'photo data' + 'photo data', ); }); @@ -120,19 +120,19 @@ describe('files', () => { }); should.equal( await files.readFileStr(path.join(dstDir, '02.txt')), - 'chapter 2' + 'chapter 2', ); should.equal( await files.readFileStr(path.join(dstDir, '03', '03.txt')), - 'ch 3' + 'ch 3', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'cover.jpg')), - 'old data' + 'old data', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'fig.png')), - 'png data' + 'png data', ); files .fileExistsSync(path.join(dstDir, '03', 'photo.jpg')) @@ -150,19 +150,19 @@ describe('files', () => { }); should.equal( await files.readFileStr(path.join(dstDir, '01.txt')), - 'chapter 1' + 'chapter 1', ); should.equal( await files.readFileStr(path.join(dstDir, '03', '03.txt')), - 'chapter 3' + 'chapter 3', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'cover.jpg')), - 'image data' + 'image data', ); should.equal( await files.readFileStr(path.join(dstDir, '03', 'photo.jpg')), - 'photo data' + 'photo data', ); files .fileExistsSync(path.join(dstDir, '03', 'fig.png')) @@ -186,7 +186,7 @@ describe('files', () => { }) .catch((err) => { err.message.should.eql( - ': File ./i-do-not-exist.txt not found. Oh noes.' + ': File ./i-do-not-exist.txt not found. Oh noes.', ); done(); }); diff --git a/packages/cli/src/tests/utils/package-manager.js b/packages/cli/src/tests/utils/package-manager.js index 19c42ec46..af7465e43 100644 --- a/packages/cli/src/tests/utils/package-manager.js +++ b/packages/cli/src/tests/utils/package-manager.js @@ -12,7 +12,7 @@ describe('package manager utils', () => { { createCwd: true, createTmp: true, - } + }, ); const man = await getPackageManager({ @@ -36,7 +36,7 @@ describe('package manager utils', () => { { createCwd: true, createTmp: true, - } + }, ); const man = await getPackageManager({ @@ -60,7 +60,7 @@ describe('package manager utils', () => { { createCwd: true, createTmp: true, - } + }, ); const man = await getPackageManager({ @@ -84,7 +84,7 @@ describe('package manager utils', () => { { createCwd: true, createTmp: true, - } + }, ); const man = await getPackageManager({ @@ -108,7 +108,7 @@ describe('package manager utils', () => { { createCwd: true, createTmp: true, - } + }, ); const man = await getPackageManager({ @@ -132,7 +132,7 @@ describe('package manager utils', () => { { createCwd: true, createTmp: true, - } + }, ); const man = await getPackageManager({ diff --git a/packages/cli/src/tests/utils/string.js b/packages/cli/src/tests/utils/string.js index a955a0550..ace91272d 100644 --- a/packages/cli/src/tests/utils/string.js +++ b/packages/cli/src/tests/utils/string.js @@ -5,7 +5,7 @@ describe('string utils', () => { describe('splitFileFromPath', () => { it('returns the file and location from a path', () => { const [dir, filename] = string.splitFileFromPath( - 'src/triggers/new_issue' + 'src/triggers/new_issue', ); filename.should.equal('new_issue.js'); dir.should.equal('src/triggers'); @@ -13,7 +13,7 @@ describe('string utils', () => { it('returns keeps a given file extension', () => { const [dir, filename] = string.splitFileFromPath( - 'src/triggers/new_issue.test.js' + 'src/triggers/new_issue.test.js', ); filename.should.equal('new_issue.test.js'); dir.should.equal('src/triggers'); @@ -22,7 +22,7 @@ describe('string utils', () => { it('uses a given suffix', () => { const [dir, filename] = string.splitFileFromPath( 'src/triggers/new_issue', - 'test.js' + 'test.js', ); filename.should.equal('new_issue.test.js'); dir.should.equal('src/triggers'); diff --git a/packages/cli/src/utils/analytics.js b/packages/cli/src/utils/analytics.js index f27c45cce..9fc4d99bd 100644 --- a/packages/cli/src/utils/analytics.js +++ b/packages/cli/src/utils/analytics.js @@ -54,7 +54,7 @@ const recordAnalytics = async (command, isValidCommand, argNames, flags) => { skipDeployKey: shouldRecordAnonymously, }, true, - false + false, ) .then(({ success }) => debug('success:', success)) .catch(({ errText }) => debug('err:', errText)); diff --git a/packages/cli/src/utils/api.js b/packages/cli/src/utils/api.js index 41208afe7..5b7287a63 100644 --- a/packages/cli/src/utils/api.js +++ b/packages/cli/src/utils/api.js @@ -32,7 +32,7 @@ const readCredentials = (explodeIfMissing = true) => { return Promise.resolve( readFile( constants.AUTH_LOCATION, - `Please run \`${colors.cyan('zapier login')}\`.` + `Please run \`${colors.cyan('zapier login')}\`.`, ) .then((buf) => { return JSON.parse(buf.toString()); @@ -43,7 +43,7 @@ const readCredentials = (explodeIfMissing = true) => { } else { return {}; } - }) + }), ); } }; @@ -54,7 +54,7 @@ const callAPI = async ( options, rawError = false, credentialsRequired = true, - returnStreamBody = false + returnStreamBody = false, ) => { // temp manual enable while we're not all the way moved over if (_.get(global, ['argOpts', 'debug'])) { @@ -149,7 +149,7 @@ const createCredentials = (username, password, totpCode) => { }, }, // if totp is empty, we want a raw request so we can supress an error. If it's here, we want it to be "non-raw" - !totpCode + !totpCode, ); }; @@ -162,22 +162,19 @@ const createCanary = async (versionFrom, versionTo, percent, duration) => { method: 'POST', body: { percent, - duration - } - } - ) -} + duration, + }, + }, + ); +}; const listCanaries = async () => { const linkedAppId = (await getLinkedAppConfig(undefined, true))?.id; - return callAPI( - `/apps/${linkedAppId}/canaries`, - { - method: 'GET', - } - ) -} + return callAPI(`/apps/${linkedAppId}/canaries`, { + method: 'GET', + }); +}; const deleteCanary = async (versionFrom, versionTo) => { const linkedAppId = (await getLinkedAppConfig(undefined, true))?.id; @@ -186,9 +183,9 @@ const deleteCanary = async (versionFrom, versionTo) => { `/apps/${linkedAppId}/versions/${versionFrom}/canary-to/${versionTo}`, { method: 'DELETE', - } - ) -} + }, + ); +}; /** * read local `apprc` file @@ -242,10 +239,10 @@ const getWritableApp = async () => { if (!linkedAppConfig.id) { throw new Error( `This project hasn't yet been associated with an existing Zapier integration.\n\nIf it's a brand new integration, run \`${colors.cyan( - 'zapier register' + 'zapier register', )}\`.\n\nIf this project already exists in your Zapier account, run \`${colors.cyan( - 'zapier link' - )}\` instead.` + 'zapier link', + )}\` instead.`, ); } @@ -261,7 +258,7 @@ const getWritableApp = async () => { throw new Error( `Your credentials are present, but invalid${ process.env.ZAPIER_BASE_ENDPOINT ? ' in this environment' : '' - }. Please run \`${colors.cyan('zapier login')}\` to resolve.` + }. Please run \`${colors.cyan('zapier login')}\` to resolve.`, ); } else if (errOrRejectedResponse.status === 404) { // if this fails, we know the issue is they can't see this app @@ -272,9 +269,9 @@ const getWritableApp = async () => { }). Try running \`${colors.cyan('zapier link')}\` to correct that.${ process.env.ZAPIER_BASE_ENDPOINT ? `\n\nFor local dev: make sure you've run \`${colors.cyan( - 'zapier login' + 'zapier login', )}\` and \`${colors.cyan( - 'zapier register' + 'zapier register', )}\` while providing ZAPIER_BASE_ENDPOINT.` : '' }`; @@ -399,10 +396,10 @@ const downloadSourceZip = async (dst) => { if (!linkedAppConfig.id) { throw new Error( `This project hasn't yet been associated with an existing Zapier integration.\n\nIf it's a brand new integration, run \`${colors.cyan( - 'zapier register' + 'zapier register', )}\`.\n\nIf this project already exists in your Zapier account, run \`${colors.cyan( - 'zapier link' - )}\` instead.` + 'zapier link', + )}\` instead.`, ); } @@ -434,7 +431,7 @@ const upload = async (app, { skipValidation = false } = {}) => { if (!fs.existsSync(fullZipPath)) { throw new Error( - 'Missing a built integration. Try running `zapier build` first.\nAlternatively, run `zapier push`, which will build and upload in one command.' + 'Missing a built integration. Try running `zapier build` first.\nAlternatively, run `zapier push`, which will build and upload in one command.', ); } diff --git a/packages/cli/src/utils/ast.js b/packages/cli/src/utils/ast.js index 15f8480da..a3fd4b85e 100644 --- a/packages/cli/src/utils/ast.js +++ b/packages/cli/src/utils/ast.js @@ -45,7 +45,7 @@ const importActionInJsApp = (codeStr, varName, path) => { const newRequireStatement = j.variableDeclaration('const', [ j.variableDeclarator( j.identifier(varName), - j.callExpression(j.identifier('require'), [j.literal(path)]) + j.callExpression(j.identifier('require'), [j.literal(path)]), ), ]); @@ -80,13 +80,13 @@ const registerActionInJsApp = (codeStr, property, varName) => { const exportAssignment = root.find(j.AssignmentExpression, { left: typeHelpers.memberExpression( typeHelpers.identifier('module'), - typeHelpers.identifier('exports') + typeHelpers.identifier('exports'), ), }); if (!exportAssignment.length) { throw new Error( - 'Nothing is exported from this file; unable to find an object to modify' + 'Nothing is exported from this file; unable to find an object to modify', ); } @@ -115,14 +115,14 @@ const registerActionInJsApp = (codeStr, property, varName) => { // check if this object already has the property at the top level const existingProp = objToModify.properties.find( - (props) => props.key.name === property + (props) => props.key.name === property, ); if (existingProp) { // `triggers: myTriggers` means we shouldn't bother const value = existingProp.value; if (value.type !== 'ObjectExpression') { throw new Error( - `Tried to edit the ${property} key, but the value wasn't an object` + `Tried to edit the ${property} key, but the value wasn't an object`, ); } value.properties.push(newProperty); @@ -131,8 +131,8 @@ const registerActionInJsApp = (codeStr, property, varName) => { j.property( 'init', j.identifier(property), - j.objectExpression([newProperty]) - ) + j.objectExpression([newProperty]), + ), ); } @@ -151,7 +151,7 @@ const registerActionInJsApp = (codeStr, property, varName) => { const importActionInTsApp = ( codeStr, identifierName, - actionRelativeImportPath + actionRelativeImportPath, ) => { const root = ts(codeStr); @@ -159,7 +159,7 @@ const importActionInTsApp = ( const newImportStatement = j.importDeclaration( [j.importDefaultSpecifier(j.identifier(identifierName))], - j.literal(actionRelativeImportPath) + j.literal(actionRelativeImportPath), ); if (imports.length) { @@ -197,8 +197,8 @@ const registerActionInTsApp = (codeStr, actionTypePlural, identifierName) => { .find(ts.ObjectExpression) .filter((path) => path.value.properties.some( - (prop) => prop.key && prop.key.name === 'platformVersion' - ) + (prop) => prop.key && prop.key.name === 'platformVersion', + ), ); if (appObjectCandidates.length !== 1) { throw new Error('Unable to find the app definition to modify'); @@ -209,13 +209,13 @@ const registerActionInTsApp = (codeStr, actionTypePlural, identifierName) => { // Check if this object already has the actionType group inside it. const existingProp = appObj.properties.find( - (props) => props.key.name === actionTypePlural + (props) => props.key.name === actionTypePlural, ); if (existingProp) { const value = existingProp.value; if (value.type !== 'ObjectExpression') { throw new Error( - `Tried to edit the ${actionTypePlural} key, but the value wasn't an object` + `Tried to edit the ${actionTypePlural} key, but the value wasn't an object`, ); } value.properties.push(newProperty); @@ -224,8 +224,8 @@ const registerActionInTsApp = (codeStr, actionTypePlural, identifierName) => { j.property( 'init', j.identifier(actionTypePlural), - j.objectExpression([newProperty]) - ) + j.objectExpression([newProperty]), + ), ); } diff --git a/packages/cli/src/utils/auth-files-codegen.js b/packages/cli/src/utils/auth-files-codegen.js index 666cf3e2f..ba0256d69 100644 --- a/packages/cli/src/utils/auth-files-codegen.js +++ b/packages/cli/src/utils/auth-files-codegen.js @@ -43,7 +43,7 @@ const authFileExport = ( connectionLabel = strLiteral('{{json.username}}'), test = objProperty('test'), authFields = [], - } = {} + } = {}, ) => { return exportStatement( obj( @@ -54,49 +54,49 @@ const authFileExport = ( objProperty('type', strLiteral(authType)), ...extraConfigProps, comment( - "Define any input app's auth requires here. The user will be prompted to enter this info when they connect their account." + "Define any input app's auth requires here. The user will be prompted to enter this info when they connect their account.", ), objProperty('fields', arr(...authFields)), comment( - "The test method allows Zapier to verify that the credentials a user provides are valid. We'll execute this method whenever a user connects their account for the first time." + "The test method allows Zapier to verify that the credentials a user provides are valid. We'll execute this method whenever a user connects their account for the first time.", ), test, comment( `This template string can access all the data returned from the auth test. If you return the test object, you'll access the returned data with a label like \`{{json.X}}\`. If you return \`response.data\` from your test, then your label can be \`{{X}}\`. This can also be a function that returns a label. That function has the standard args \`(${standardArgs.join( - ', ' - )})\` and data returned from the test can be accessed in \`bundle.inputData.X\`.` + ', ', + )})\` and data returned from the test can be accessed in \`bundle.inputData.X\`.`, ), - objProperty('connectionLabel', connectionLabel) - ) + objProperty('connectionLabel', connectionLabel), + ), ), objProperty('befores', arr(...beforeFuncNames)), - objProperty('afters', arr(...afterFuncNames)) - ) + objProperty('afters', arr(...afterFuncNames)), + ), ); }; const authTestFunc = (testUrl = strLiteral(authJsonUrl('me'))) => block( comment( - 'You want to make a request to an endpoint that is either specifically designed to test auth, or one that every user will have access to. eg: `/me`.' + 'You want to make a request to an endpoint that is either specifically designed to test auth, or one that every user will have access to. eg: `/me`.', ), comment( - 'By returning the entire request object, you have access to the request and response data for testing purposes. Your connection label can access any data from the returned response using the `json.` prefix. eg: `{{json.username}}`.' + 'By returning the entire request object, you have access to the request and response data for testing purposes. Your connection label can access any data from the returned response using the `json.` prefix. eg: `{{json.username}}`.', ), - fatArrowReturnFunctionDeclaration('test', standardArgs, zRequest(testUrl)) + fatArrowReturnFunctionDeclaration('test', standardArgs, zRequest(testUrl)), ); const handleBadResponsesFunc = ( funcName, - invalidInfo = 'username and/or password' + invalidInfo = 'username and/or password', ) => afterMiddlewareFunc( funcName, ifStatement( 'response.status === 401', - zResponseErr(strLiteral(`The ${invalidInfo} you supplied is incorrect`)) + zResponseErr(strLiteral(`The ${invalidInfo} you supplied is incorrect`)), ), - returnStatement(RESPONSE_VAR) + returnStatement(RESPONSE_VAR), ); const basicAuthFile = () => { @@ -107,8 +107,8 @@ const basicAuthFile = () => { authFileExport( 'basic', '"basic" auth automatically creates "username" and "password" input fields. It also registers default middleware to create the authentication header.', - { afterFuncNames: [badFuncName] } - ) + { afterFuncNames: [badFuncName] }, + ), ); }; @@ -118,7 +118,7 @@ const basicAuthFile = () => { const beforeMiddlewareFunc = (funcName, ...statements) => block( comment( - "This function runs before every outbound request. You can have as many as you need. They'll need to each be registered in your index.js file." + "This function runs before every outbound request. You can have as many as you need. They'll need to each be registered in your index.js file.", ), functionDeclaration( funcName, @@ -127,16 +127,16 @@ const beforeMiddlewareFunc = (funcName, ...statements) => // auto include the return if it's not here already statements[statements.length - 1].includes('return') ? '' - : returnStatement('request') - ) + : returnStatement('request'), + ), ); const afterMiddlewareFunc = (funcName, ...statements) => block( comment( - "This function runs after every outbound request. You can use it to check for errors or modify the response. You can have as many as you need. They'll need to each be registered in your index.js file." + "This function runs after every outbound request. You can use it to check for errors or modify the response. You can have as many as you need. They'll need to each be registered in your index.js file.", ), - functionDeclaration(funcName, { args: afterMiddlewareArgs }, ...statements) + functionDeclaration(funcName, { args: afterMiddlewareArgs }, ...statements), ); const includeBearerFunc = (funcName) => @@ -147,9 +147,9 @@ const includeBearerFunc = (funcName) => assignmentStatement( 'request.headers.Authorization', // eslint-disable-next-line no-template-curly-in-string - interpLiteral('Bearer ${bundle.authData.access_token}') - ) - ) + interpLiteral('Bearer ${bundle.authData.access_token}'), + ), + ), ); const tokenExchangeFunc = ( @@ -157,7 +157,7 @@ const tokenExchangeFunc = ( requestUrl, bodyProps, returnProps, - { requestProps = [], returnComments = [] } = {} + { requestProps = [], returnComments = [] } = {}, ) => functionDeclaration( funcName, @@ -169,21 +169,21 @@ const tokenExchangeFunc = ( strLiteral(requestUrl), objProperty('method', strLiteral('POST')), objProperty('body', obj(...bodyProps)), - ...requestProps - ) - ) + ...requestProps, + ), + ), ), comment( "If you're using core v9.x or older, you should call response.throwForStatus() or verify response.status === 200 before you continue.", - 1 + 1, ), ...returnComments, - returnStatement(obj(...returnProps)) + returnStatement(obj(...returnProps)), ); const oauth2TokenExchangeFunc = ( funcName, - { path, grantType, bodyProps = [], returnComments = [] } + { path, grantType, bodyProps = [], returnComments = [] }, ) => { return tokenExchangeFunc( funcName, @@ -209,12 +209,12 @@ const oauth2TokenExchangeFunc = ( obj( objProperty( 'content-type', - strLiteral('application/x-www-form-urlencoded') - ) - ) + strLiteral('application/x-www-form-urlencoded'), + ), + ), ), ], - } + }, ); }; @@ -226,14 +226,14 @@ const getAccessTokenFunc = () => { comment( `Extra data can be pulled from the querystring. For instance:\n${objProperty( 'accountDomain', - 'bundle.cleanedRequest.querystring.accountDomain' - )}` + 'bundle.cleanedRequest.querystring.accountDomain', + )}`, ), ], grantType: 'authorization_code', returnComments: [ comment( - 'If your app does an app refresh, then `refresh_token` should be returned here as well' + 'If your app does an app refresh, then `refresh_token` should be returned here as well', ), ], }); @@ -247,7 +247,7 @@ const refreshTokenFunc = () => { returnComments: [ comment('If the refresh token stays constant, no need to return it.'), comment( - 'If the refresh token does change, return it here to update the stored value in Zapier' + 'If the refresh token does change, return it here to update the stored value in Zapier', ), ], }); @@ -276,36 +276,36 @@ const oauth2AuthFile = () => { obj( objProperty( 'url', - strLiteral(authJsonUrl('oauth/authorize')) + strLiteral(authJsonUrl('oauth/authorize')), ), objProperty( 'params', obj( objProperty( 'client_id', - strLiteral('{{process.env.CLIENT_ID}}') + strLiteral('{{process.env.CLIENT_ID}}'), ), objProperty( 'state', - strLiteral('{{bundle.inputData.state}}') + strLiteral('{{bundle.inputData.state}}'), ), objProperty( 'redirect_uri', - strLiteral('{{bundle.inputData.redirect_uri}}') + strLiteral('{{bundle.inputData.redirect_uri}}'), ), - objProperty('response_type', strLiteral('code')) - ) - ) - ) + objProperty('response_type', strLiteral('code')), + ), + ), + ), ), objProperty(getOauthAccessTokenFuncName), objProperty(refreshOath2AccessTokenFuncName), - objProperty('autoRefresh', 'true') - ) + objProperty('autoRefresh', 'true'), + ), ), ], - } - ) + }, + ), ); }; const customAuthFile = () => { @@ -323,10 +323,10 @@ const customAuthFile = () => { assignmentStatement('request.params.api_key', 'bundle.authData.apiKey'), comment( 'If you want to include the API key in the header instead, uncomment this:', - 1 + 1, ), - comment('request.headers.Authorization = bundle.authData.apiKey;') - ) + comment('request.headers.Authorization = bundle.authData.apiKey;'), + ), ), authFileExport( 'custom', @@ -338,11 +338,11 @@ const customAuthFile = () => { obj( objProperty('key', strLiteral('apiKey')), objProperty('label', strLiteral('API Key')), - objProperty('required', 'true') + objProperty('required', 'true'), ), ], - } - ) + }, + ), ); }; @@ -352,15 +352,15 @@ const digestAuthFile = () => { // special digest auth authTestFunc( strLiteral( - 'https://httpbin.zapier-tooling.com/digest-auth/auth/myuser/mypass' - ) + 'https://httpbin.zapier-tooling.com/digest-auth/auth/myuser/mypass', + ), ), handleBadResponsesFunc(badFuncName), authFileExport( 'digest', '"digest" auth automatically creates "username" and "password" input fields. It also registers default middleware to create the authentication header.', - { afterFuncNames: [badFuncName] } - ) + { afterFuncNames: [badFuncName] }, + ), ); }; @@ -378,10 +378,10 @@ const sessionAuthFile = () => { ], [ comment( - 'FIXME: The `|| "secret"` below is just for demo purposes, you should remove it.' + 'FIXME: The `|| "secret"` below is just for demo purposes, you should remove it.', ), objProperty('sessionKey', 'response.data.sessionKey || "secret"'), - ] + ], ), beforeMiddlewareFunc( includeSessionKeyName, @@ -390,9 +390,9 @@ const sessionAuthFile = () => { assignmentStatement('request.headers', 'request.headers || {}'), assignmentStatement( "request.headers['X-API-Key']", - 'bundle.authData.sessionKey' - ) - ) + 'bundle.authData.sessionKey', + ), + ), ), authFileExport( 'session', @@ -404,24 +404,24 @@ const sessionAuthFile = () => { obj( objProperty('key', strLiteral('username')), objProperty('label', strLiteral('Username')), - objProperty('required', 'true') + objProperty('required', 'true'), ), obj( objProperty('key', strLiteral('password')), objProperty('label', strLiteral('Password')), objProperty('required', 'true'), comment('this lets the user enter masked data'), - objProperty('type', strLiteral('password')) + objProperty('type', strLiteral('password')), ), ], extraConfigProps: [ objProperty( 'sessionConfig', - obj(objProperty('perform', getSessionKeyName)) + obj(objProperty('perform', getSessionKeyName)), ), ], - } - ) + }, + ), ); }; // just different enough from oauth2 that it gets its own function @@ -440,13 +440,13 @@ const oauth1TokenExchangeFunc = (funcName, url, ...authProperties) => { obj( objProperty('oauth_consumer_key', 'process.env.CLIENT_ID'), objProperty('oauth_consumer_secret', 'process.env.CLIENT_SECRET'), - ...authProperties - ) - ) - ) - ) + ...authProperties, + ), + ), + ), + ), ), - returnStatement(`querystring.parse(${RESPONSE_VAR}.content)`) + returnStatement(`querystring.parse(${RESPONSE_VAR}.content)`), ); }; const oauth1AuthFile = () => { @@ -460,37 +460,37 @@ const oauth1AuthFile = () => { block( variableAssignmentDeclaration( requestTokenVarName, - strLiteral('https://trello.com/1/OAuthGetRequestToken') + strLiteral('https://trello.com/1/OAuthGetRequestToken'), ), variableAssignmentDeclaration( accessTokenVarName, - strLiteral('https://trello.com/1/OAuthGetAccessToken') + strLiteral('https://trello.com/1/OAuthGetAccessToken'), ), variableAssignmentDeclaration( authorizeUrlVarName, - strLiteral('https://trello.com/1/OAuthAuthorizeToken') - ) + strLiteral('https://trello.com/1/OAuthAuthorizeToken'), + ), ), oauth1TokenExchangeFunc( getRequestTokenFuncName, requestTokenVarName, objProperty('oauth_signature_method', strLiteral('HMAC-SHA1')), objProperty('oauth_callback', 'bundle.inputData.redirect_uri'), - comment("oauth_version: '1.0' // sometimes required") + comment("oauth_version: '1.0' // sometimes required"), ), oauth1TokenExchangeFunc( getOauthAccessTokenFuncName, accessTokenVarName, objProperty('oauth_token', 'bundle.inputData.oauth_token'), objProperty('oauth_token_secret', 'bundle.inputData.oauth_token_secret'), - objProperty('oauth_verifier', 'bundle.inputData.oauth_verifier') + objProperty('oauth_verifier', 'bundle.inputData.oauth_verifier'), ), beforeMiddlewareFunc( includeAccessTokenFuncName, ifStatement( 'bundle.authData && bundle.authData.oauth_token && bundle.authData.oauth_token_secret', comment( - 'Put your OAuth1 credentials in `req.auth`, Zapier will sign the request for you.' + 'Put your OAuth1 credentials in `req.auth`, Zapier will sign the request for you.', ), assignmentStatement( 'request.auth', @@ -500,13 +500,13 @@ const oauth1AuthFile = () => { objProperty('oauth_token', 'bundle.authData.oauth_token'), objProperty( 'oauth_token_secret', - 'bundle.authData.oauth_token_secret' + 'bundle.authData.oauth_token_secret', ), comment("oauth_version: '1.0', // sometimes required"), - objProperty('...(request.auth || {})') - ) - ) - ) + objProperty('...(request.auth || {})'), + ), + ), + ), ), authTestFunc(strLiteral('https://api.trello.com/1/members/me/')), authFileExport('oauth1', 'OAuth1 is an older form of OAuth', { @@ -516,7 +516,7 @@ const oauth1AuthFile = () => { 'oauth1Config', obj( comment( - "We have to define getRequestToken and getAccessToken functions to explicitly parse the response like it has a form body here, since Trello responds 'text/plain' for the Content-Type header" + "We have to define getRequestToken and getAccessToken functions to explicitly parse the response like it has a form body here, since Trello responds 'text/plain' for the Content-Type header", ), objProperty(getRequestTokenFuncName), objProperty(getOauthAccessTokenFuncName), @@ -529,18 +529,21 @@ const oauth1AuthFile = () => { obj( objProperty( 'oauth_token', - strLiteral('{{bundle.inputData.oauth_token}}') + strLiteral('{{bundle.inputData.oauth_token}}'), + ), + objProperty( + 'name', + strLiteral('Zapier/Trello OAuth1 Test'), ), - objProperty('name', strLiteral('Zapier/Trello OAuth1 Test')) - ) - ) - ) - ) - ) + ), + ), + ), + ), + ), ), ], connectionLabel: strLiteral('{{username}}'), - }) + }), ); }; diff --git a/packages/cli/src/utils/build.js b/packages/cli/src/utils/build.js index f5150e437..0637dfecd 100644 --- a/packages/cli/src/utils/build.js +++ b/packages/cli/src/utils/build.js @@ -99,7 +99,7 @@ const requiredFiles = (cwd, entryPoints) => { .on('end', () => { paths.sort(); resolve(paths); - }) + }), ); b.bundle(); }); @@ -152,10 +152,10 @@ const forceIncludeDumbPath = (appConfig, filePath) => { filePath.endsWith(path.join('bin', 'linux-x64-node-14', 'deasync.node')) || filePath.endsWith( // Special, for zapier-platform-legacy-scripting-runner - path.join('bin', `linux-x64-node-${nodeMajorVersion}`, 'deasync.node') + path.join('bin', `linux-x64-node-${nodeMajorVersion}`, 'deasync.node'), ) || filePath.match( - path.sep === '\\' ? /aws-sdk\\apis\\.*\.json/ : /aws-sdk\/apis\/.*\.json/ + path.sep === '\\' ? /aws-sdk\\apis\\.*\.json/ : /aws-sdk\/apis\/.*\.json/, ) || matchesConfigInclude ); @@ -211,7 +211,7 @@ const makeZip = async (dir, zipPath, disableDependencyDetection) => { paths = dumbPaths; } else { let finalPaths = smartPaths.concat( - dumbPaths.filter(forceIncludeDumbPath.bind(null, appConfig)) + dumbPaths.filter(forceIncludeDumbPath.bind(null, appConfig)), ); finalPaths = _.uniq(finalPaths); finalPaths.sort(); @@ -257,7 +257,7 @@ const maybeNotifyAboutOutdated = () => { // `build` won't run if package.json isn't there, so if we get to here we're good const requiredVersion = _.get( require(path.resolve('./package.json')), - `dependencies.${constants.PLATFORM_PACKAGE}` + `dependencies.${constants.PLATFORM_PACKAGE}`, ); if (requiredVersion) { @@ -269,11 +269,11 @@ const maybeNotifyAboutOutdated = () => { if (notifier.update && notifier.update.latest !== requiredVersion) { notifier.notify({ message: `There's a newer version of ${colors.cyan( - constants.PLATFORM_PACKAGE + constants.PLATFORM_PACKAGE, )} available.\nConsider updating the dependency in your\n${colors.cyan( - 'package.json' + 'package.json', )} (${colors.grey(notifier.update.current)} → ${colors.green( - notifier.update.latest + notifier.update.latest, )}) and then running ${colors.red('zapier test')}.`, }); } @@ -285,10 +285,9 @@ const maybeRunBuildScript = async (options = {}) => { // Make sure we don't accidentally call the Zapier build hook inside itself if (process.env.npm_lifecycle_event !== ZAPIER_BUILD_KEY) { - const pJson = require(path.resolve( - options.cwd || process.cwd(), - 'package.json' - )); + const pJson = require( + path.resolve(options.cwd || process.cwd(), 'package.json'), + ); if (_.get(pJson, ['scripts', ZAPIER_BUILD_KEY])) { startSpinner(`Running ${ZAPIER_BUILD_KEY} script`); @@ -314,7 +313,7 @@ const listWorkspaces = (workspaceRoot) => { } return (packageJson.workspaces || []).map((relpath) => - path.resolve(workspaceRoot, relpath) + path.resolve(workspaceRoot, relpath), ); }; @@ -332,7 +331,7 @@ const _buildFunc = async ({ const osTmpDir = await fse.realpath(os.tmpdir()); const tmpDir = path.join( osTmpDir, - 'zapier-' + crypto.randomBytes(4).toString('hex') + 'zapier-' + crypto.randomBytes(4).toString('hex'), ); debug('Using temp directory: ', tmpDir); @@ -373,7 +372,7 @@ const _buildFunc = async ({ if (stat.isSymbolicLink()) { const realPath = path.resolve( path.dirname(src), - fse.readlinkSync(src) + fse.readlinkSync(src), ); for (const workspace of workspaces) { // Use minimatch to do glob pattern match. If match, it means the @@ -408,11 +407,11 @@ const _buildFunc = async ({ const corePath = path.join( tmpDir, 'node_modules', - constants.PLATFORM_PACKAGE + constants.PLATFORM_PACKAGE, ); if (!fs.existsSync(corePath)) { throw new Error( - 'Could not install dependencies properly. Error log:\n' + output.stderr + 'Could not install dependencies properly. Error log:\n' + output.stderr, ); } @@ -428,12 +427,12 @@ const _buildFunc = async ({ 'node_modules', constants.PLATFORM_PACKAGE, 'include', - 'zapierwrapper.js' - ) + 'zapierwrapper.js', + ), ); await writeFile( path.join(tmpDir, 'zapierwrapper.js'), - zapierWrapperBuf.toString() + zapierWrapperBuf.toString(), ); if (printProgress) { @@ -449,13 +448,13 @@ const _buildFunc = async ({ const fileWriteError = await writeFile( path.join(tmpDir, 'definition.json'), - prettyJSONstringify(rawDefinition) + prettyJSONstringify(rawDefinition), ); if (fileWriteError) { debug('\nFile Write Error:\n', fileWriteError, '\n'); throw new Error( - `Unable to write ${tmpDir}/definition.json, please check file permissions!` + `Unable to write ${tmpDir}/definition.json, please check file permissions!`, ); } @@ -481,7 +480,7 @@ const _buildFunc = async ({ if (validationErrors.length) { debug('\nErrors:\n', validationErrors, '\n'); throw new Error( - 'We hit some validation errors, try running `zapier validate` to see them!' + 'We hit some validation errors, try running `zapier validate` to see them!', ); } @@ -493,10 +492,10 @@ const _buildFunc = async ({ debug( '\nErrors:\n', prettyJSONstringify(styleChecksResponse.errors.results), - '\n' + '\n', ); throw new Error( - 'We hit some style validation errors, try running `zapier validate` to see them!' + 'We hit some style validation errors, try running `zapier validate` to see them!', ); } if (printProgress) { @@ -524,7 +523,7 @@ const _buildFunc = async ({ await makeSourceZip( tmpDir, path.join(wdir, sourceZipPath), - disableDependencyDetection + disableDependencyDetection, ); if (printProgress) { @@ -541,7 +540,7 @@ const _buildFunc = async ({ await runCommand( 'find', ['.', '-exec', 'touch', '-t', '201601010000', '{}', '+'], - { cwd: tmpDir } + { cwd: tmpDir }, ); } @@ -561,7 +560,7 @@ const _buildFunc = async ({ const buildAndOrUpload = async ( { build = false, upload = false } = {}, - buildOpts + buildOpts, ) => { if (!(build || upload)) { throw new Error('must either build or upload'); diff --git a/packages/cli/src/utils/changelog.js b/packages/cli/src/utils/changelog.js index 69fcd47e9..ed3e441e1 100644 --- a/packages/cli/src/utils/changelog.js +++ b/packages/cli/src/utils/changelog.js @@ -18,7 +18,7 @@ const getChangelogFromMarkdown = (version, markdown) => { .split('\n'); let startingLine = lines.findIndex((line) => - RegExp(`^#{1,4} .*${version.split('.').join('\\.')}`).test(line) + RegExp(`^#{1,4} .*${version.split('.').join('\\.')}`).test(line), ); if (startingLine === -1) { diff --git a/packages/cli/src/utils/check-missing-app-info.js b/packages/cli/src/utils/check-missing-app-info.js index 47f109837..ef2c8a0d8 100644 --- a/packages/cli/src/utils/check-missing-app-info.js +++ b/packages/cli/src/utils/check-missing-app-info.js @@ -12,13 +12,13 @@ module.exports = (app) => { { apiName: 'role' }, ]; const missingRequiredFields = requiredFields.filter( - (field) => app[field.apiName] == null + (field) => app[field.apiName] == null, ); if (missingRequiredFields.length) { throw new Error( `Your integration is missing required info (${missingRequiredFields .map((field) => field.cliName ?? field.apiName) - .join(', ')}). Please, run "zapier register" to add it.` + .join(', ')}). Please, run "zapier register" to add it.`, ); } diff --git a/packages/cli/src/utils/convert.js b/packages/cli/src/utils/convert.js index 58e6869a1..163ec36e9 100644 --- a/packages/cli/src/utils/convert.js +++ b/packages/cli/src/utils/convert.js @@ -40,19 +40,21 @@ const createFile = async (content, filename, dir) => { endSpinner(); }; -const prettifyJs = (code) => - prettier.format(code, { singleQuote: true, parser: 'babel' }); +const prettifyJs = async (code) => { + return prettier.format(code, { singleQuote: true, parser: 'babel' }); +}; + const prettifyJSON = (origString) => JSON.stringify(origString, null, 2); const renderTemplate = async ( templateFile, templateContext, - prettify = true + prettify = true, ) => { const templateBuf = await readFile(templateFile); const template = templateBuf.toString(); let content = _.template(template, { interpolate: /<%=([\s\S]+?)%>/g })( - templateContext + templateContext, ); if (prettify) { @@ -99,7 +101,7 @@ const getAuthFieldKeys = (appDefinition) => { const renderPackageJson = async (appInfo, appDefinition) => { const name = _.kebabCase( - appInfo.title || _.get(appInfo, ['general', 'title']) + appInfo.title || _.get(appInfo, ['general', 'title']), ); // Not using escapeSpecialChars because we don't want to escape single quotes (not @@ -180,7 +182,7 @@ const renderSource = (definition, functions = {}) => { funcName = `${funcNameBase}${funcNum}`; } functions[funcName] = `const ${funcName} = async (${args.join( - ', ' + ', ', )}) => {\n${source}\n};`; this.parent.update(makePlaceholder(funcName)); @@ -188,26 +190,28 @@ const renderSource = (definition, functions = {}) => { }); }; -const renderDefinitionSlice = (definitionSlice, filename) => { +const renderDefinitionSlice = async (definitionSlice, filename) => { let exportBlock = _.cloneDeep(definitionSlice); let functionBlock = {}; renderSource(exportBlock, functionBlock); exportBlock = `module.exports = ${replacePlaceholders( - JSON.stringify(exportBlock) + JSON.stringify(exportBlock), )};\n`; functionBlock = Object.values(functionBlock).join('\n\n'); const uglyCode = functionBlock + '\n\n' + exportBlock; try { - return prettifyJs(uglyCode); + const prettyCode = await prettifyJs(uglyCode); + return prettyCode; } catch (err) { console.warn( `Warning: Your code has syntax error in ${chalk.underline.bold( - filename - )}. ` + `It will be left as is and won't be prettified.\n\n${err.message}` + filename, + )}. ` + + `It will be left as is and won't be prettified.\n\n${err.message}`, ); return uglyCode; } @@ -238,7 +242,7 @@ const renderIndex = async (appDefinition) => { // replace version and platformVersion with dynamic reference exportBlock.version = makePlaceholder("require('./package.json').version"); exportBlock.platformVersion = makePlaceholder( - "require('zapier-platform-core').version" + "require('zapier-platform-core').version", ); if (appDefinition.authentication) { @@ -269,7 +273,7 @@ const renderIndex = async (appDefinition) => { exportBlock[stepType][makePlaceholder(`[${importName}.key]`)] = makePlaceholder(importName); }); - } + }, ); if (!_.isEmpty(appDefinition.hydrators)) { @@ -282,21 +286,23 @@ const renderIndex = async (appDefinition) => { if (appDefinition.legacy && appDefinition.legacy.scriptingSource) { importBlock.push("\nconst fs = require('fs');"); importBlock.push( - "const scriptingSource = fs.readFileSync('./scripting.js', { encoding: 'utf8' });" + "const scriptingSource = fs.readFileSync('./scripting.js', { encoding: 'utf8' });", ); exportBlock.legacy.scriptingSource = makePlaceholder('scriptingSource'); } exportBlock = `module.exports = ${replacePlaceholders( - JSON.stringify(exportBlock) + JSON.stringify(exportBlock), )};`; importBlock = importBlock.join('\n'); functionBlock = Object.values(functionBlock).join('\n\n'); - return prettifyJs( - importBlock + '\n\n' + functionBlock + '\n\n' + exportBlock + const prettyCode = await prettifyJs( + importBlock + '\n\n' + functionBlock + '\n\n' + exportBlock, ); + + return prettyCode; }; const renderEnvironment = (appDefinition) => { @@ -339,7 +345,7 @@ const writeScripting = async (appDefinition, newAppDir) => { await createFile( appDefinition.legacy.scriptingSource, 'scripting.js', - newAppDir + newAppDir, ); }; @@ -385,7 +391,7 @@ const convertApp = async (appInfo, appDefinition, newAppDir) => { _.each(appDefinition[stepType], (definition, key) => { promises.push( writeStep(stepType, definition, key, newAppDir), - writeStepTest(stepType, definition, key, newAppDir) + writeStepTest(stepType, definition, key, newAppDir), ); }); }); @@ -405,7 +411,7 @@ const convertApp = async (appInfo, appDefinition, newAppDir) => { writeIndex(appDefinition, newAppDir), writeEnvironment(appDefinition, newAppDir), writeGitIgnore(newAppDir), - writeZapierAppRc(appInfo, appDefinition, newAppDir) + writeZapierAppRc(appInfo, appDefinition, newAppDir), ); return Promise.all(promises); diff --git a/packages/cli/src/utils/credentials.js b/packages/cli/src/utils/credentials.js index 4a3379e3f..d4aeb8caa 100644 --- a/packages/cli/src/utils/credentials.js +++ b/packages/cli/src/utils/credentials.js @@ -3,7 +3,7 @@ const { BASE_ENDPOINT } = require('../constants'); const isSamlEmail = async (email) => { const rawResponse = await fetch( - `${BASE_ENDPOINT}/api/v4/idp-discovery/?email=${encodeURIComponent(email)}` + `${BASE_ENDPOINT}/api/v4/idp-discovery/?email=${encodeURIComponent(email)}`, ); const { results = [], errors = [] } = await rawResponse.json(); if (errors.length) { diff --git a/packages/cli/src/utils/display.js b/packages/cli/src/utils/display.js index 240a81558..26a76cf7b 100644 --- a/packages/cli/src/utils/display.js +++ b/packages/cli/src/utils/display.js @@ -102,7 +102,7 @@ const makeRowBasedTable = (rows, columnDefs, { includeIndex = true } = {}) => { } return maxLength; }, - 1 + 1, ); const widthForValue = process.stdout.columns - maxLabelLength - 15; // The last bit accounts for some padding and borders if (widthForValue < 1) { @@ -165,7 +165,7 @@ const makeTable = ( columnDefs, showHeaders = true, hasBorder = true, - style = undefined + style = undefined, ) => { const tableOptions = { head: showHeaders ? columnDefs.map(([label]) => label) : undefined, diff --git a/packages/cli/src/utils/files.js b/packages/cli/src/utils/files.js index 86dfab56a..6ef61a40e 100644 --- a/packages/cli/src/utils/files.js +++ b/packages/cli/src/utils/files.js @@ -33,7 +33,7 @@ const validateFileExists = (fileName, errMsg) => { // Returns a promise that reads a file and returns a buffer. const readFile = (fileName, errMsg) => { return validateFileExists(fileName, errMsg).then(() => - fse.readFile(fixHome(fileName)) + fse.readFile(fixHome(fileName)), ); }; @@ -137,8 +137,8 @@ const copyDir = async (src, dst, options) => { if (fse.lstatSync(srcItem).isSymbolicLink()) { console.warn( colors.yellow( - `\n! Warning: symlink "${srcItem}" points to a non-existent file. Skipping!\n` - ) + `\n! Warning: symlink "${srcItem}" points to a non-existent file. Skipping!\n`, + ), ); return null; } diff --git a/packages/cli/src/utils/ignore.js b/packages/cli/src/utils/ignore.js index e3bfabb92..3fea07bd5 100644 --- a/packages/cli/src/utils/ignore.js +++ b/packages/cli/src/utils/ignore.js @@ -17,8 +17,8 @@ const respectGitIgnore = (dir, paths) => { if (!constants.IS_TESTING) { console.warn( `\n\n\t${colors.yellow( - '!! Warning !!' - )}\n\nThere is no .gitignore, so we are including all files. This might make the source.zip file too large\n` + '!! Warning !!', + )}\n\nThere is no .gitignore, so we are including all files. This might make the source.zip file too large\n`, ); } return paths; diff --git a/packages/cli/src/utils/local.js b/packages/cli/src/utils/local.js index 714b01381..4cefad1ca 100644 --- a/packages/cli/src/utils/local.js +++ b/packages/cli/src/utils/local.js @@ -32,7 +32,7 @@ const getLocalAppHandler = ({ reload = false, baseEvent = {} } = {}) => { { calledFromCli: true, }, - baseEvent + baseEvent, ); handler(event, _, callback); }; diff --git a/packages/cli/src/utils/metadata.js b/packages/cli/src/utils/metadata.js index 551ed76dc..b681f6031 100644 --- a/packages/cli/src/utils/metadata.js +++ b/packages/cli/src/utils/metadata.js @@ -33,7 +33,7 @@ const extractMetadata = (token, context) => { }; } const appMetadata = token.match( - /(?(trigger|create|search))\/(?\w+)/ + /(?(trigger|create|search))\/(?\w+)/, ); if ( appMetadata?.groups?.actionKey && diff --git a/packages/cli/src/utils/misc.js b/packages/cli/src/utils/misc.js index 166d4d846..f07843d39 100644 --- a/packages/cli/src/utils/misc.js +++ b/packages/cli/src/utils/misc.js @@ -41,8 +41,8 @@ const runCommand = (command, args, options) => { debug('\n'); debug( `Running ${colors.bold( - command + ' ' + args.join(' ') - )} command in ${colors.bold(options.cwd || process.cwd())}:\n` + command + ' ' + args.join(' '), + )} command in ${colors.bold(options.cwd || process.cwd())}:\n`, ); return new Promise((resolve, reject) => { @@ -109,7 +109,7 @@ const isValidAppInstall = () => { return { valid: false, reason: `Your app doesn't depend on ${PLATFORM_PACKAGE}. Run \`${colors.cyan( - `npm install -E ${PLATFORM_PACKAGE}` + `npm install -E ${PLATFORM_PACKAGE}`, )}\` to resolve.`, }; } else if (!semver.valid(dependedCoreVersion)) { @@ -130,20 +130,19 @@ const isValidAppInstall = () => { return { valid: false, reason: `Looks like you're missing a local installation of ${PLATFORM_PACKAGE}. Run \`${colors.cyan( - 'npm install' + 'npm install', )}\` to resolve.`, }; } - const installedPackageJson = require(path.join( - corePackageDir, - 'package.json' - )); + const installedPackageJson = require( + path.join(corePackageDir, 'package.json'), + ); const installedCoreVersion = installedPackageJson.version; if (installedCoreVersion !== dependedCoreVersion) { console.warn( - `\nYour code depends on v${dependedCoreVersion} of ${PLATFORM_PACKAGE}, but your local copy is v${installedCoreVersion}. You should probably reinstall your dependencies.\n` + `\nYour code depends on v${dependedCoreVersion} of ${PLATFORM_PACKAGE}, but your local copy is v${installedCoreVersion}. You should probably reinstall your dependencies.\n`, ); } @@ -181,7 +180,7 @@ const printVersionInfo = (context) => { if (fileExistsSync(path.resolve('./package.json'))) { let requiredVersion = _.get( require(path.resolve('./package.json')), - `dependencies.${PLATFORM_PACKAGE}` + `dependencies.${PLATFORM_PACKAGE}`, ); if (requiredVersion) { // might be a caret, have to coerce for later comparison @@ -193,34 +192,34 @@ const printVersionInfo = (context) => { if (requiredVersion !== PACKAGE_VERSION) { versions.push( `${colors.yellow('\nWarning!')} "CLI" (${colors.green( - PACKAGE_VERSION + PACKAGE_VERSION, )}) and "core" (${colors.green( - requiredVersion + requiredVersion, )}) versions are out of sync. This is probably fine, but if you're experiencing issues, update the ${colors.cyan( - PLATFORM_PACKAGE + PLATFORM_PACKAGE, )} dependency in your ${colors.cyan( - 'package.json' - )} to ${colors.green(PACKAGE_VERSION)}.` + 'package.json', + )} to ${colors.green(PACKAGE_VERSION)}.`, ); } if ( fileExistsSync( - path.resolve(`./node_modules/${PLATFORM_PACKAGE}/package.json`) + path.resolve(`./node_modules/${PLATFORM_PACKAGE}/package.json`), ) ) { // double check they have the right version installed - const installedPkgVersion = require(path.resolve( - `./node_modules/${PLATFORM_PACKAGE}/package.json` - )).version; + const installedPkgVersion = require( + path.resolve(`./node_modules/${PLATFORM_PACKAGE}/package.json`), + ).version; if (requiredVersion !== installedPkgVersion) { versions.push( `${colors.yellow('\nWarning!')} Required version (${colors.green( - requiredVersion + requiredVersion, )}) and installed version (${colors.green( - installedPkgVersion - )}) are out of sync. Run ${colors.cyan('`npm install`')} to fix.\n` + installedPkgVersion, + )}) are out of sync. Run ${colors.cyan('`npm install`')} to fix.\n`, ); } } diff --git a/packages/cli/src/utils/promisify.js b/packages/cli/src/utils/promisify.js index b93ec590a..c1500a024 100644 --- a/packages/cli/src/utils/promisify.js +++ b/packages/cli/src/utils/promisify.js @@ -30,7 +30,7 @@ const promisifyAll = (object, context) => { result[name] = method; return result; }, - {} + {}, ); }; diff --git a/packages/cli/src/utils/scaffold.js b/packages/cli/src/utils/scaffold.js index 4325c4876..b49ed41d2 100644 --- a/packages/cli/src/utils/scaffold.js +++ b/packages/cli/src/utils/scaffold.js @@ -26,7 +26,7 @@ const getTemplatePath = (templateType, language = 'js') => '..', '..', 'scaffold', - `${templateType}.template.${language}` + `${templateType}.template.${language}`, ); // useful for making sure we don't conflict with other, similarly named things @@ -104,15 +104,15 @@ const writeTemplateFile = async ({ throw new Error( [ `File ${colors.bold(filename)} already exists within ${colors.bold( - location + location, )}.`, 'You can either:', ' 1. Choose a different filename', ` 2. Delete ${filename} from ${location}`, ` 3. Run ${colors.italic('scaffold')} with ${colors.bold( - '--force' + '--force', )} to overwrite the current ${filename}`, - ].join('\n') + ].join('\n'), ); } @@ -130,7 +130,7 @@ const isValidEntryFileUpdate = ( language, indexFileResolved, actionType, - newActionKey + newActionKey, ) => { if (language === 'js') { // ensure a clean access @@ -196,12 +196,12 @@ const updateEntryFileJs = async ({ codeStr = importActionInJsApp( codeStr, actionImportName, - actionRelativeImportPath + actionRelativeImportPath, ); codeStr = registerActionInJsApp( codeStr, plural(actionType), - actionImportName + actionImportName, ); await writeFile(indexFileResolved, codeStr); return originalCodeStr; @@ -227,12 +227,12 @@ const updateEntryFileTs = async ({ codeStr = importActionInTsApp( codeStr, actionImportName, - actionRelativeImportPath + actionRelativeImportPath, ); codeStr = registerActionInTsApp( codeStr, plural(actionType), - actionImportName + actionImportName, ); await writeFile(indexFileResolved, codeStr); return originalCodeStr; @@ -271,7 +271,7 @@ const createScaffoldingContext = ({ const actionFileResolved = `${path.join( cwd, actionDirLocal, - key + key, )}.${language}`; const actionFileResolvedStem = path.join(cwd, actionDirLocal, key); const actionFileLocal = `${path.join(actionDirLocal, key)}.${language}`; @@ -279,13 +279,13 @@ const createScaffoldingContext = ({ const testFileResolved = `${path.join( cwd, testDirLocal, - key + key, )}.test.${language}`; const testFileLocal = `${path.join(testDirLocal, key)}.${language}`; const testFileLocalStem = path.join(testDirLocal, key); const actionRelativeImportPath = `./${getRelativeRequirePath( indexFileResolved, - actionFileResolvedStem + actionFileResolvedStem, )}`; return { diff --git a/packages/cli/src/utils/team.js b/packages/cli/src/utils/team.js index f64048ede..0dbac5b56 100644 --- a/packages/cli/src/utils/team.js +++ b/packages/cli/src/utils/team.js @@ -10,8 +10,8 @@ const transformUserRole = (role) => role === 'collaborator' ? 'admin' : role === 'subscriber' - ? 'subscriber' - : 'collaborator'; + ? 'subscriber' + : 'collaborator'; const listTeamMembers = async () => { return listEndpointMulti( @@ -24,7 +24,7 @@ const listTeamMembers = async () => { endpoint: (app) => `${constants.BASE_ENDPOINT}/api/platform/v3/integrations/${app.id}/subscribers`, keyOverride: 'subscribers', - } + }, ); }; module.exports = { diff --git a/packages/cli/src/utils/xdg.js b/packages/cli/src/utils/xdg.js index 63a2af419..9bb3af796 100644 --- a/packages/cli/src/utils/xdg.js +++ b/packages/cli/src/utils/xdg.js @@ -38,17 +38,17 @@ if (process.platform === 'win32') { ensureDataDir = ensureDir.bind( null, 'XDG_DATA_HOME', - path.join(HOME_DIR, '.local', 'share') + path.join(HOME_DIR, '.local', 'share'), ); ensureCacheDir = ensureDir.bind( null, 'XDG_CACHE_HOME', - path.join(HOME_DIR, '.cache') + path.join(HOME_DIR, '.cache'), ); ensureConfigDir = ensureDir.bind( null, 'XDG_CONFIG_HOME', - path.join(HOME_DIR, '.config') + path.join(HOME_DIR, '.config'), ); } diff --git a/packages/core/bin/upload-lambda.js b/packages/core/bin/upload-lambda.js index fa2aede71..5336ef815 100755 --- a/packages/core/bin/upload-lambda.js +++ b/packages/core/bin/upload-lambda.js @@ -36,5 +36,5 @@ lambda.updateFunctionCode( console.log(data); // successful response console.log('Now you can try `npm run lambda-integration-test`.'); } - } + }, ); diff --git a/packages/core/integration-test/integration-test.js b/packages/core/integration-test/integration-test.js index a534314ab..7d0f406a4 100644 --- a/packages/core/integration-test/integration-test.js +++ b/packages/core/integration-test/integration-test.js @@ -52,7 +52,7 @@ runLambda.testName = 'runLambda'; const runLocally = (event) => { return new Promise((resolve, reject) => { const handler = createLambdaHandler( - path.resolve(__dirname, '../test/userapp') + path.resolve(__dirname, '../test/userapp'), ); handler(event, {}, (err, data) => { @@ -782,15 +782,15 @@ const doTest = (runner) => { testError( 'triggers.failerfuncasyncList.operation.perform', - 'Failer on async function!' + 'Failer on async function!', ); testError( 'resources.failerfunc.list.operation.perform', - 'Failer on sync function!' + 'Failer on sync function!', ); testError( 'resources.failerfuncpromise.list.operation.perform', - 'Failer on promise function!' + 'Failer on promise function!', ); }); }); diff --git a/packages/core/smoke-test/smoke-test.js b/packages/core/smoke-test/smoke-test.js index af8459831..df524e320 100644 --- a/packages/core/smoke-test/smoke-test.js +++ b/packages/core/smoke-test/smoke-test.js @@ -30,7 +30,7 @@ const setupZapierRC = () => { } else if (process.env.DEPLOY_KEY) { fs.writeFileSync( rcPath, - JSON.stringify({ deployKey: process.env.DEPLOY_KEY }) + JSON.stringify({ deployKey: process.env.DEPLOY_KEY }), ); hasRC = true; } @@ -48,7 +48,7 @@ const setupZapierAppRC = (workdir) => { JSON.stringify({ id: parseInt(process.env.TEST_APP_ID), key: process.env.TEST_APP_KEY, - }) + }), ); hasAppRC = true; } @@ -83,9 +83,8 @@ const npmPackCore = (schemaPackagePath) => { encoding: 'utf8', }); const packageJson = JSON.parse(originalPackageJsonText); - packageJson.dependencies[ - 'zapier-platform-schema' - ] = `file:${schemaPackagePath}`; + packageJson.dependencies['zapier-platform-schema'] = + `file:${schemaPackagePath}`; fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson)); let filename; @@ -113,7 +112,7 @@ const setupTempWorkingDir = () => { while (!workdir || fs.existsSync(workdir)) { workdir = path.join( tmpBaseDir, - 'zapier-' + crypto.randomBytes(20).toString('hex') + 'zapier-' + crypto.randomBytes(20).toString('hex'), ); } fs.mkdirSync(workdir); @@ -190,13 +189,13 @@ describe('smoke tests - setup will take some time', () => { context.schemaPackage.filename = npmPack(schemaDir); context.schemaPackage.path = path.join( schemaDir, - context.schemaPackage.filename + context.schemaPackage.filename, ); context.corePackage.filename = npmPackCore(context.schemaPackage.path); context.corePackage.path = path.join( process.cwd(), - context.corePackage.filename + context.corePackage.filename, ); context.workRepoDir = setupTempWorkingDir(); @@ -232,7 +231,7 @@ describe('smoke tests - setup will take some time', () => { npmInstalls( context.corePackage.path, context.cliPackage.path, - context.workAppDir + context.workAppDir, ); context.hasAppRC = setupZapierAppRC(context.workAppDir); @@ -241,7 +240,7 @@ describe('smoke tests - setup will take some time', () => { context.workAppDir, 'node_modules', '.bin', - 'zapier' + 'zapier', ); }); @@ -277,7 +276,7 @@ describe('smoke tests - setup will take some time', () => { PATH: process.env.PATH, DISABLE_ZAPIER_ANALYTICS: 1, }, - } + }, ); if (proc.status !== 0) { console.log(proc.stdout); diff --git a/packages/core/src/app-middlewares/after/checks.js b/packages/core/src/app-middlewares/after/checks.js index 33b3a2fd3..4815ac1ec 100644 --- a/packages/core/src/app-middlewares/after/checks.js +++ b/packages/core/src/app-middlewares/after/checks.js @@ -41,11 +41,11 @@ const checkOutput = (output) => { if (constants.IS_TESTING || event.isDeveloper || event.calledFromCli) { const shortMsgs = checkResults.map((info) => ` - ${info.error}`); throw new errors.CheckError( - 'Invalid API Response:\n' + shortMsgs.join('\n') + 'Invalid API Response:\n' + shortMsgs.join('\n'), ); } else { const longMsgs = checkResults.map( - (info) => `Zapier check "${info.name}" failed: ${info.error}` + (info) => `Zapier check "${info.name}" failed: ${info.error}`, ); longMsgs.forEach((err) => input.z.console.error(err)); } diff --git a/packages/core/src/app-middlewares/before/add-app-context.js b/packages/core/src/app-middlewares/before/add-app-context.js index 7ca1d8426..0c014d8f2 100644 --- a/packages/core/src/app-middlewares/before/add-app-context.js +++ b/packages/core/src/app-middlewares/before/add-app-context.js @@ -16,7 +16,7 @@ const addAppContext = (input) => { input._addContext( `Executing ${methodName} with bundle`, - JSON.stringify(logSafeBundle(bundle)) + JSON.stringify(logSafeBundle(bundle)), ); return input; }; diff --git a/packages/core/src/app-middlewares/before/z-object.js b/packages/core/src/app-middlewares/before/z-object.js index 8f2c295ac..dfbe3219e 100644 --- a/packages/core/src/app-middlewares/before/z-object.js +++ b/packages/core/src/app-middlewares/before/z-object.js @@ -30,9 +30,11 @@ const injectZObject = (input) => { hash: hashing.hashify, JSON: createJSONtool(), require: (moduleName) => - require(require.resolve(moduleName, { - paths: module.paths.concat([process.cwd()]), - })), + require( + require.resolve(moduleName, { + paths: module.paths.concat([process.cwd()]), + }), + ), stashFile: createFileStasher(input), }; diff --git a/packages/core/src/checks/perform-buffer-return-type.js b/packages/core/src/checks/perform-buffer-return-type.js index d5334f858..0283897f3 100644 --- a/packages/core/src/checks/perform-buffer-return-type.js +++ b/packages/core/src/checks/perform-buffer-return-type.js @@ -48,7 +48,7 @@ const performBufferEchoesIds = { typeof item.error !== 'string' ) { errors.push( - `Result object member with ID '${id}' must have 'outputData' object or 'error' string` + `Result object member with ID '${id}' must have 'outputData' object or 'error' string`, ); } diff --git a/packages/core/src/checks/trigger-has-unique-primary.js b/packages/core/src/checks/trigger-has-unique-primary.js index 4426c7e55..406f04859 100644 --- a/packages/core/src/checks/trigger-has-unique-primary.js +++ b/packages/core/src/checks/trigger-has-unique-primary.js @@ -53,7 +53,7 @@ const stringifyValuesFromPrimaryKeys = (result, primaryKeys) => { } if (!isPrimitive(v)) { throw new TypeError( - `As part of primary key, field "${k}" must be a primitive (non-object like number or string)` + `As part of primary key, field "${k}" must be a primitive (non-object like number or string)`, ); } return [k, v]; diff --git a/packages/core/src/errors.js b/packages/core/src/errors.js index e79ceeef8..b5fb68d5c 100644 --- a/packages/core/src/errors.js +++ b/packages/core/src/errors.js @@ -10,7 +10,7 @@ class AppError extends Error { message, code, status, - }) + }), ); this.name = 'AppError'; this.doNotContextify = true; @@ -38,7 +38,7 @@ class ResponseError extends Error { request: { url: response.request.url, }, - }) + }), ); this.name = 'ResponseError'; this.doNotContextify = true; @@ -51,7 +51,7 @@ class ThrottledError extends Error { JSON.stringify({ message, delay, - }) + }), ); this.name = 'ThrottledError'; this.doNotContextify = true; @@ -92,7 +92,7 @@ const exceptions = _.reduce( Error: AppError, ResponseError, ThrottledError, - } + }, ); const isRequireError = ({ name, message }) => @@ -103,7 +103,7 @@ const handleError = (...args) => { const { RequireModuleError } = exceptions; if (isRequireError(error)) { throw new RequireModuleError( - 'For technical reasons, use z.require() instead of require().' + 'For technical reasons, use z.require() instead of require().', ); } diff --git a/packages/core/src/execute.js b/packages/core/src/execute.js index 36f5a0169..023a99d48 100644 --- a/packages/core/src/execute.js +++ b/packages/core/src/execute.js @@ -21,12 +21,12 @@ const executeHttpRequest = (input, options) => { skipThrowForStatus: false, }, options, - constants.REQUEST_OBJECT_SHORTHAND_OPTIONS + constants.REQUEST_OBJECT_SHORTHAND_OPTIONS, ); return input.z.request(options).then((response) => { if (response.data === undefined) { throw new Error( - 'Response needs to be JSON, form-urlencoded or parsed in middleware.' + 'Response needs to be JSON, form-urlencoded or parsed in middleware.', ); } return response.data; @@ -38,8 +38,8 @@ const executeInputOutputFields = (inputOutputFields, input) => { return ZapierPromise.all( inputOutputFields.map((field) => - _.isFunction(field) ? field(input.z, input.bundle) : field - ) + _.isFunction(field) ? field(input.z, input.bundle) : field, + ), ).then((fields) => _.flatten(fields)); }; @@ -87,7 +87,7 @@ const execute = (app, input) => { const requestWithInput = _.extend( {}, injectInput(input)(options), - constants.REQUEST_OBJECT_SHORTHAND_OPTIONS + constants.REQUEST_OBJECT_SHORTHAND_OPTIONS, ); const preparedRequest = addQueryParams(prepareRequest(requestWithInput)); return preparedRequest.url; @@ -95,7 +95,7 @@ const execute = (app, input) => { return executeHttpRequest(input, options); } else { throw new Error( - `Error: Could not find the method to call: ${input._zapier.event.method}` + `Error: Could not find the method to call: ${input._zapier.event.method}`, ); } }; diff --git a/packages/core/src/http-middlewares/after/log-response.js b/packages/core/src/http-middlewares/after/log-response.js index a396ba462..f6b388265 100644 --- a/packages/core/src/http-middlewares/after/log-response.js +++ b/packages/core/src/http-middlewares/after/log-response.js @@ -67,7 +67,7 @@ const logResponse = (resp) => { resp._addContext(infoMsg); resp._addContext( - `Received content "${String(logs.data.response_content).substr(0, 100)}"` + `Received content "${String(logs.data.response_content).substr(0, 100)}"`, ); // steamroll any results/errors with org response! diff --git a/packages/core/src/http-middlewares/after/prepare-response.js b/packages/core/src/http-middlewares/after/prepare-response.js index 1ea6f73b9..ef9c606ec 100644 --- a/packages/core/src/http-middlewares/after/prepare-response.js +++ b/packages/core/src/http-middlewares/after/prepare-response.js @@ -32,7 +32,7 @@ const prepareRawResponse = (resp, request) => { throw new Error( 'You passed {raw: true} in request() - the response.content property is not ' + 'available! Try response.body.pipe() for streaming, response.buffer() for a ' + - 'buffer, or response.text() for string.' + 'buffer, or response.text() for string.', ); }, }); diff --git a/packages/core/src/http-middlewares/before/add-digest-auth-header.js b/packages/core/src/http-middlewares/before/add-digest-auth-header.js index bddbb3410..ed6db5bf9 100644 --- a/packages/core/src/http-middlewares/before/add-digest-auth-header.js +++ b/packages/core/src/http-middlewares/before/add-digest-auth-header.js @@ -9,7 +9,7 @@ const { parseDictHeader } = require('../../tools/http'); const buildDigestHeader = (username, password, url, method, creds) => { if (creds.algorithm && creds.algorithm.toUpperCase() !== 'MD5') { throw new NotImplementedError( - "algorithm 'MD5-SESS' and 'SHA' are not implemented yet" + "algorithm 'MD5-SESS' and 'SHA' are not implemented yet", ); } @@ -29,7 +29,7 @@ const buildDigestHeader = (username, password, url, method, creds) => { response = md5(`${HA1}:${creds.nonce}:00000001:${cnonce}:auth:${HA2}`); } else { throw new NotImplementedError( - "qop other than 'auth' is not implemented yet" + "qop other than 'auth' is not implemented yet", ); } @@ -71,7 +71,7 @@ const addDigestAuthHeader = async (request, z, bundle) => { bundle.authData.password, request.url, method, - creds + creds, ); const cookie = res.headers.get('set-cookie'); diff --git a/packages/core/src/http-middlewares/before/add-query-params.js b/packages/core/src/http-middlewares/before/add-query-params.js index 846234f10..833cff014 100644 --- a/packages/core/src/http-middlewares/before/add-query-params.js +++ b/packages/core/src/http-middlewares/before/add-query-params.js @@ -28,7 +28,7 @@ const addQueryParams = (req) => { // no replaceAll in JS yet, coming in a node version soon! stringifiedParams = stringifiedParams.replace( new RegExp(valToReplace, 'g'), - char + char, ); } } diff --git a/packages/core/src/http-middlewares/before/oauth1-sign-request.js b/packages/core/src/http-middlewares/before/oauth1-sign-request.js index 6003d2c25..5413df33d 100644 --- a/packages/core/src/http-middlewares/before/oauth1-sign-request.js +++ b/packages/core/src/http-middlewares/before/oauth1-sign-request.js @@ -54,7 +54,7 @@ const collectParamsForBaseString = (req, authParams) => { _.extendWith( params, querystring.parse(new urllib.URL(req.url).search.substr(1)), - makeArrayOnDupeKey + makeArrayOnDupeKey, ); if (req.body && getContentType(req.headers) === FORM_TYPE) { @@ -67,7 +67,7 @@ const collectParamsForBaseString = (req, authParams) => { const buildAuthorizationHeader = (params) => { const paramList = _.map( params, - (v, k) => `${oauth.rfc3986(k)}="${oauth.rfc3986(v)}"` + (v, k) => `${oauth.rfc3986(k)}="${oauth.rfc3986(v)}"`, ); return `OAuth ${paramList.join(',')}`; }; @@ -83,7 +83,7 @@ const oauth1SignRequest = (req) => { stripQueryFromUrl(req.url), paramsForBaseString, req.auth.oauth_consumer_secret, - req.auth.oauth_token_secret + req.auth.oauth_token_secret, ); // Implements https://tools.ietf.org/html/rfc5849#section-3.5.1 diff --git a/packages/core/src/http-middlewares/before/prepare-request.js b/packages/core/src/http-middlewares/before/prepare-request.js index a54b70f01..91258e451 100644 --- a/packages/core/src/http-middlewares/before/prepare-request.js +++ b/packages/core/src/http-middlewares/before/prepare-request.js @@ -117,7 +117,7 @@ const prepareRequest = function (req) { skipThrowForStatus: _.get( input, ['_zapier', 'app', 'flags', 'skipThrowForStatus'], - false + false, ), _addContext: () => {}, }); @@ -135,7 +135,7 @@ const prepareRequest = function (req) { const bank = createBundleBank( input._zapier.app, input._zapier.event, - req.serializeValueForCurlies + req.serializeValueForCurlies, ); req = recurseReplaceBank(req, bank); } diff --git a/packages/core/src/tools/cleaner.js b/packages/core/src/tools/cleaner.js index b2b79c7ed..c8b4ac65f 100644 --- a/packages/core/src/tools/cleaner.js +++ b/packages/core/src/tools/cleaner.js @@ -88,8 +88,8 @@ const recurseReplaceBank = (obj, bank = {}) => { throw new TypeError( 'Cannot reliably interpolate objects or arrays into a string. ' + `Variable \`${bareKey}\` is an ${getObjectType( - replacementValue - )}:\n"${replacementValue}"` + replacementValue, + )}:\n"${replacementValue}"`, ); } @@ -109,7 +109,7 @@ const recurseReplaceBank = (obj, bank = {}) => { const finalizeBundle = pipe( pick(Object.keys(DEFAULT_BUNDLE)), - defaults(DEFAULT_BUNDLE) + defaults(DEFAULT_BUNDLE), ); // Takes a raw app and bundle and composes a bank of {{key}}->val @@ -169,12 +169,12 @@ const isEmptyQueryParam = (value) => const normalizeEmptyParamFields = normalizeEmptyRequestFields.bind( null, isEmptyQueryParam, - 'params' + 'params', ); const normalizeEmptyBodyFields = normalizeEmptyRequestFields.bind( null, (v) => typeof v === 'string' && v.search(isCurlies) >= 0, - 'body' + 'body', ); module.exports = { diff --git a/packages/core/src/tools/create-app-tester.js b/packages/core/src/tools/create-app-tester.js index 0861d4a69..be8b10de8 100644 --- a/packages/core/src/tools/create-app-tester.js +++ b/packages/core/src/tools/create-app-tester.js @@ -41,8 +41,8 @@ const createAppTester = (appRaw, { customStoreKey } = {}) => { } else { throw new Error( `Unable to find the following on your App instance: ${JSON.stringify( - methodOrFunc - )}` + methodOrFunc, + )}`, ); } } diff --git a/packages/core/src/tools/create-cache.js b/packages/core/src/tools/create-cache.js index f2d6e8513..fc2b7d893 100644 --- a/packages/core/src/tools/create-cache.js +++ b/packages/core/src/tools/create-cache.js @@ -13,7 +13,7 @@ const createCache = (input) => { value = null, ttl = null, scope = null, - nx = null + nx = null, ) => { if (!rpc) { throw new Error('rpc is not available'); @@ -33,7 +33,7 @@ const createCache = (input) => { !scope.every((v) => v === 'user' || v === 'auth')) ) { throw new TypeError( - 'scope must be an array of strings with values "user" or "auth"' + 'scope must be an array of strings with values "user" or "auth"', ); } @@ -54,7 +54,14 @@ const createCache = (input) => { set: async (key, value, ttl = null, scope = null, nx = null) => { runValidationChecks(rpc, key, value, ttl, scope, nx); - return await rpc('zcache_set', key, JSON.stringify(value), ttl, scope, nx); + return await rpc( + 'zcache_set', + key, + JSON.stringify(value), + ttl, + scope, + nx, + ); }, delete: async (key, scope = null) => { runValidationChecks(rpc, key, scope); diff --git a/packages/core/src/tools/create-dehydrator.js b/packages/core/src/tools/create-dehydrator.js index 58c26536e..ae731fc95 100644 --- a/packages/core/src/tools/create-dehydrator.js +++ b/packages/core/src/tools/create-dehydrator.js @@ -13,7 +13,7 @@ const createDehydrator = (input, type = 'method') => { inputData = inputData || {}; if (inputData.inputData) { throw new DehydrateError( - 'Oops! You passed a full `bundle` - really you should pass what you want under `inputData`!' + 'Oops! You passed a full `bundle` - really you should pass what you want under `inputData`!', ); } const payload = { diff --git a/packages/core/src/tools/create-file-stasher.js b/packages/core/src/tools/create-file-stasher.js index 82307d934..6402a5c35 100644 --- a/packages/core/src/tools/create-file-stasher.js +++ b/packages/core/src/tools/create-file-stasher.js @@ -53,7 +53,7 @@ const resolveRemoteStream = async (stream) => { // https://github.com/node-fetch/node-fetch#streams const tmpFilePath = path.join( os.tmpdir(), - 'stash-' + randomBytes(16).toString('hex') + 'stash-' + randomBytes(16).toString('hex'), ); try { @@ -171,7 +171,7 @@ const resolveToBufferStringStream = async (responseOrData) => { throw new TypeError( `z.stashFile() cannot stash type '${typeof responseOrData}'. ` + - 'Pass it a request, readable stream, string, or Buffer.' + 'Pass it a request, readable stream, string, or Buffer.', ); }; @@ -185,7 +185,7 @@ const ensureUploadMaxSizeNotExceeded = (streamOrData, length) => { if (length && length > uploadMaxSize) { throw new Error( - `${length} bytes is too big, ${uploadMaxSize} is the max for ${uploadMethod} data.` + `${length} bytes is too big, ${uploadMaxSize} is the max for ${uploadMethod} data.`, ); } }; @@ -202,7 +202,7 @@ const ensureMetadataMaxSizeNotExceeded = (filename) => { encodedFilename.length > filenameMaxSize ) { throw new Error( - `URI-Encoded Filename is too long at ${encodedFilename.length}, ${ENCODED_FILENAME_MAX_LENGTH} is the max.` + `URI-Encoded Filename is too long at ${encodedFilename.length}, ${ENCODED_FILENAME_MAX_LENGTH} is the max.`, ); } } @@ -222,17 +222,17 @@ const createFileStasher = (input) => { const isRunningOnHydrator = _.get( input, '_zapier.event.method', - '' + '', ).startsWith('hydrators.'); const isRunningOnCreate = _.get( input, '_zapier.event.method', - '' + '', ).startsWith('creates.'); if (!isRunningOnHydrator && !isRunningOnCreate) { throw new Error( - 'Files can only be stashed within a create or hydration function/method.' + 'Files can only be stashed within a create or hydration function/method.', ); } @@ -276,7 +276,7 @@ const createFileStasher = (input) => { streamOrData, finalLength, filename || _filename, - contentType || _contentType + contentType || _contentType, ); }; }; diff --git a/packages/core/src/tools/create-http-patch.js b/packages/core/src/tools/create-http-patch.js index 1b1df51be..787827382 100644 --- a/packages/core/src/tools/create-http-patch.js +++ b/packages/core/src/tools/create-http-patch.js @@ -89,7 +89,7 @@ const createHttpPatch = (event) => { object.zapierLogger( `${logData.response_status_code} ${logData.request_method} ${logData.request_url}`, - logData + logData, ); }; @@ -106,7 +106,7 @@ const createHttpPatch = (event) => { }); } else { const responseBody = _.map(chunks, (chunk) => - chunk.toString() + chunk.toString(), ).join('\n'); sendToLogger(responseBody); } diff --git a/packages/core/src/tools/create-lambda-handler.js b/packages/core/src/tools/create-lambda-handler.js index bad894b89..0d4fceea3 100644 --- a/packages/core/src/tools/create-lambda-handler.js +++ b/packages/core/src/tools/create-lambda-handler.js @@ -114,7 +114,7 @@ const getAppRawOverride = (rpc, appRawOverride) => { if (typeof appRawOverride !== 'string') { appRawExtension = mayMoveCreatesToResourcesInExtension( appRawOverride, - appRawExtension + appRawExtension, ); appRawOverride = extendAppRaw(appRawOverride, appRawExtension); resolve(appRawOverride); diff --git a/packages/core/src/tools/create-logger.js b/packages/core/src/tools/create-logger.js index 0651e8399..61780748c 100644 --- a/packages/core/src/tools/create-logger.js +++ b/packages/core/src/tools/create-logger.js @@ -85,7 +85,7 @@ const httpDetailsLogMessage = (data) => { } return result; }, - {} + {}, ); if (trimmedData.request_params) { @@ -343,12 +343,12 @@ const sendLog = async (logStreamFactory, options, event, message, data) => { if (options.token) { const logStream = logStreamFactory.getOrCreate( options.endpoint, - options.token + options.token, ); logStream.write( // JSON Lines format: It's important the serialized JSON object itself has // no line breaks, and after an object it ends with a line break. - JSON.stringify({ message: safeMessage, data: safeData }) + '\n' + JSON.stringify({ message: safeMessage, data: safeData }) + '\n', ); if (logStreamFactory.ended) { diff --git a/packages/core/src/tools/create-request-client.js b/packages/core/src/tools/create-request-client.js index eb1ed0870..987b2ba44 100644 --- a/packages/core/src/tools/create-request-client.js +++ b/packages/core/src/tools/create-request-client.js @@ -32,7 +32,7 @@ const createRequestClient = (befores, afters, options) => { httpBefores.concat(ensureArray(befores)), httpAfters.concat(ensureArray(afters)), request, - options + options, ); return requestSugar.addUrlOrOptions(client); }; diff --git a/packages/core/src/tools/create-response-stasher.js b/packages/core/src/tools/create-response-stasher.js index 41c489081..f55ab680e 100644 --- a/packages/core/src/tools/create-response-stasher.js +++ b/packages/core/src/tools/create-response-stasher.js @@ -36,8 +36,8 @@ const stashResponse = async (input, response) => { encodedResponse, encodedResponse.length, crypto.randomUUID() + '.txt', - 'text/plain' - ) + 'text/plain', + ), ); }; diff --git a/packages/core/src/tools/create-rpc-client.js b/packages/core/src/tools/create-rpc-client.js index d57c12375..76033e9a8 100644 --- a/packages/core/src/tools/create-rpc-client.js +++ b/packages/core/src/tools/create-rpc-client.js @@ -90,7 +90,7 @@ const createRpcClient = (event) => { if (constants.IS_TESTING) { throw new Error( 'No deploy key found. Make sure you set the `ZAPIER_DEPLOY_KEY` environment variable ' + - 'to write tests that rely on the RPC API (i.e. z.stashFile)' + 'to write tests that rely on the RPC API (i.e. z.stashFile)', ); } else { throw new Error('No token found - cannot call RPC'); @@ -115,7 +115,7 @@ const createRpcClient = (event) => { // check if the ids match if (res.content.id !== id) { throw new Error( - `Got id ${res.content.id} but expected ${id} when calling RPC` + `Got id ${res.content.id} but expected ${id} when calling RPC`, ); } if (res.content.error) { @@ -130,7 +130,7 @@ const createRpcClient = (event) => { if (attempt === maxRetries || (res && res.status < 500)) { throw new Error( - `RPC request failed after ${attempt} attempts: ${err.message}` + `RPC request failed after ${attempt} attempts: ${err.message}`, ); } // sleep for 100ms before retrying diff --git a/packages/core/src/tools/create-storekey-tool.js b/packages/core/src/tools/create-storekey-tool.js index 372ca03c8..885125e53 100644 --- a/packages/core/src/tools/create-storekey-tool.js +++ b/packages/core/src/tools/create-storekey-tool.js @@ -22,7 +22,7 @@ const createStoreKeyTool = (input) => { if (!_.isString(cursor)) { return ZapierPromise.reject( - new TypeError('cursor value must be a string') + new TypeError('cursor value must be a string'), ); } diff --git a/packages/core/src/tools/data.js b/packages/core/src/tools/data.js index 084f6e28d..bda2f7e7f 100644 --- a/packages/core/src/tools/data.js +++ b/packages/core/src/tools/data.js @@ -294,7 +294,7 @@ const truncateData = (data, maxLength) => { parent, key, item, - maxLength - length - truncateMessageSize + maxLength - length - truncateMessageSize, ); if (itemWasTruncated) { diff --git a/packages/core/src/tools/ensure-json-encodable.js b/packages/core/src/tools/ensure-json-encodable.js index 4a6e28216..53d72da87 100644 --- a/packages/core/src/tools/ensure-json-encodable.js +++ b/packages/core/src/tools/ensure-json-encodable.js @@ -13,7 +13,7 @@ const ensureJSONEncodable = (obj, path = null, visited = null) => { const typeName = typeof obj; const pathStr = path.join('.'); throw new TypeError( - `Type '${typeName}' is not JSON-encodable (path: '${pathStr}')` + `Type '${typeName}' is not JSON-encodable (path: '${pathStr}')`, ); } @@ -22,7 +22,7 @@ const ensureJSONEncodable = (obj, path = null, visited = null) => { if (visited.has(obj)) { const pathStr = path.join('.'); throw new TypeError( - `Circular structure is not JSON-encodable (path: '${pathStr}')` + `Circular structure is not JSON-encodable (path: '${pathStr}')`, ); } diff --git a/packages/core/src/tools/environment.js b/packages/core/src/tools/environment.js index 14ab4ad6f..9f625a54c 100644 --- a/packages/core/src/tools/environment.js +++ b/packages/core/src/tools/environment.js @@ -56,7 +56,7 @@ const injectEnvironmentFile = (filename) => { '\nWARNING: `.environment` files will no longer be read by default in the next major version.', 'Either rename your file to `.env` or explicitly call this function with a filename:', '\n zapier.tools.env.inject(".environment");\n\n', - ].join('\n') + ].join('\n'), ); } } diff --git a/packages/core/src/tools/memoize.js b/packages/core/src/tools/memoize.js index 74a6fd724..0e28c5832 100644 --- a/packages/core/src/tools/memoize.js +++ b/packages/core/src/tools/memoize.js @@ -38,7 +38,7 @@ var _slicedToArray = (function () { return sliceIterator(arr, i); } else { throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' + 'Invalid attempt to destructure non-iterable instance', ); } }; diff --git a/packages/core/src/tools/memory-checker.js b/packages/core/src/tools/memory-checker.js index 959dc3c47..64d6c9a44 100644 --- a/packages/core/src/tools/memory-checker.js +++ b/packages/core/src/tools/memory-checker.js @@ -15,10 +15,9 @@ const checkMemory = (event) => { } catch (err) { if (err.code === 'EMFILE') { console.error( - 'Force killing process by Zapier for too many open file descriptors' + 'Force killing process by Zapier for too many open file descriptors', ); - /* eslint no-process-exit: 0 */ process.exit(1); } else { throw err; diff --git a/packages/core/src/tools/request-clean.js b/packages/core/src/tools/request-clean.js index e2fa61010..69fd678cf 100644 --- a/packages/core/src/tools/request-clean.js +++ b/packages/core/src/tools/request-clean.js @@ -27,7 +27,7 @@ const requestClean = (request) => { request.params = _.merge( {}, request.params || {}, - querystring.parse(request.url.split('?').slice(1).join('?')) + querystring.parse(request.url.split('?').slice(1).join('?')), ); request.url = request.url.split('?')[0]; } diff --git a/packages/core/src/tools/request-merge.js b/packages/core/src/tools/request-merge.js index 951e8e0ad..115b93af7 100644 --- a/packages/core/src/tools/request-merge.js +++ b/packages/core/src/tools/request-merge.js @@ -27,7 +27,7 @@ const caseInsensitiveMerge = (requestOne, requestTwo, requestThree) => { requestKeys.forEach((checkingKey) => { const foundKeyIndex = _.findIndex( existingKeys, - (key) => key.toLowerCase() === checkingKey.toLowerCase() + (key) => key.toLowerCase() === checkingKey.toLowerCase(), ); if (foundKeyIndex === -1) { diff --git a/packages/core/src/tools/resolve-method-path.js b/packages/core/src/tools/resolve-method-path.js index 176655d68..29b095a15 100644 --- a/packages/core/src/tools/resolve-method-path.js +++ b/packages/core/src/tools/resolve-method-path.js @@ -18,7 +18,7 @@ const resolveMethodPath = (app, needle, explodeIfMissing = true) => { ) ) { throw new Error( - `You must pass in a function/array/object. We got ${typeof needle} instead.` + `You must pass in a function/array/object. We got ${typeof needle} instead.`, ); } @@ -28,7 +28,7 @@ const resolveMethodPath = (app, needle, explodeIfMissing = true) => { memoizedFindMapDeep(app, needle, isEqual); if (!path && explodeIfMissing) { throw new Error( - 'We could not find your function/array/object anywhere on your App definition.' + 'We could not find your function/array/object anywhere on your App definition.', ); } diff --git a/packages/core/src/tools/response-cleaner.js b/packages/core/src/tools/response-cleaner.js index 5d31e2e2f..3bedf0828 100644 --- a/packages/core/src/tools/response-cleaner.js +++ b/packages/core/src/tools/response-cleaner.js @@ -9,7 +9,7 @@ const responseCleaner = (response) => { 'params', 'headers', 'body', - 'data' + 'data', ); response = _.pick(response, 'status', 'content', 'headers', 'request'); return dataTools.jsonCopy(response); diff --git a/packages/core/src/tools/schema.js b/packages/core/src/tools/schema.js index b7d8dfe5a..cba5adf22 100644 --- a/packages/core/src/tools/schema.js +++ b/packages/core/src/tools/schema.js @@ -125,7 +125,7 @@ const compileApp = (appRaw) => { actions.forEach((a) => { const collisions = _.intersection( Object.keys(extras[a] || {}), - Object.keys(appRaw[a] || {}) + Object.keys(appRaw[a] || {}), ); if (collisions.length) { problemKeys = problemKeys.concat(collisions.map((k) => `${a}.${k}`)); @@ -165,7 +165,7 @@ const compileApp = (appRaw) => { appRaw.triggers[trigger.key] = copyPropertiesFromResource( 'trigger', trigger, - appRaw + appRaw, ); }); @@ -173,7 +173,7 @@ const compileApp = (appRaw) => { appRaw.searches[search.key] = copyPropertiesFromResource( 'search', search, - appRaw + appRaw, ); }); @@ -181,7 +181,7 @@ const compileApp = (appRaw) => { appRaw.creates[create.key] = copyPropertiesFromResource( 'create', create, - appRaw + appRaw, ); }); diff --git a/packages/core/src/tools/uploader.js b/packages/core/src/tools/uploader.js index c473ef29b..92a3bce6e 100644 --- a/packages/core/src/tools/uploader.js +++ b/packages/core/src/tools/uploader.js @@ -13,7 +13,7 @@ const uploader = async ( bufferStringStream, knownLength, filename, - contentType + contentType, ) => { filename = path.basename(filename).replace('"', ''); @@ -56,7 +56,7 @@ const uploader = async ( response.content && response.content.includes && response.content.includes( - 'You must provide the Content-Length HTTP header.' + 'You must provide the Content-Length HTTP header.', ) ) { throw new Error(LENGTH_ERR_MESSAGE); diff --git a/packages/core/src/tools/wrap-hydrate.js b/packages/core/src/tools/wrap-hydrate.js index 17a9e357a..a6cd2e417 100644 --- a/packages/core/src/tools/wrap-hydrate.js +++ b/packages/core/src/tools/wrap-hydrate.js @@ -15,7 +15,7 @@ const wrapHydrate = (payload) => { if (payload.length > MAX_PAYLOAD_SIZE) { throw new DehydrateError( - `Oops! You passed too much data (${payload.length} bytes) to your dehydration function - try slimming it down under ${MAX_PAYLOAD_SIZE} bytes (usually by just passing the needed IDs).` + `Oops! You passed too much data (${payload.length} bytes) to your dehydration function - try slimming it down under ${MAX_PAYLOAD_SIZE} bytes (usually by just passing the needed IDs).`, ); } @@ -26,7 +26,7 @@ const wrapHydrate = (payload) => { crypto .createHmac('sha1', process.env._ZAPIER_ONE_TIME_SECRET) .update(payload) - .digest() + .digest(), ).toString('base64'); payload += ':' + signature; diff --git a/packages/core/test/app-middleware.js b/packages/core/test/app-middleware.js index 9353bc2f1..09c9fa553 100644 --- a/packages/core/test/app-middleware.js +++ b/packages/core/test/app-middleware.js @@ -37,7 +37,7 @@ describe('app middleware', () => { // the before middleware is gonna re-route this to a real method const input = createTestInput( 'something.that.does.not.exist', - appDefinition + appDefinition, ); app(input) @@ -62,7 +62,7 @@ describe('app middleware', () => { // change the result returned to something else const input = createTestInput( 'resources.list.list.operation.perform', - appDefinition + appDefinition, ); app(input) @@ -86,7 +86,7 @@ describe('app middleware', () => { // returns nothing const input = createTestInput( 'resources.contact.create.operation.perform', - appDefinition + appDefinition, ); input._zapier.rpc = rpc; @@ -107,7 +107,7 @@ describe('app middleware', () => { // change the result returned to something else const input = createTestInput( 'resources.really_big_response.list.operation.perform', - appDefinition + appDefinition, ); input._zapier.rpc = rpc; @@ -130,7 +130,7 @@ describe('app middleware', () => { // returns 10mb of response const input = createTestInput( 'resources.really_big_response.list.operation.perform', - appDefinition + appDefinition, ); input._zapier.rpc = rpc; @@ -153,7 +153,7 @@ describe('app middleware', () => { // returns regular response const input = createTestInput( 'resources.list.list.operation.perform', - appDefinition + appDefinition, ); input._zapier.rpc = rpc; @@ -175,7 +175,7 @@ describe('app middleware', () => { // returns regular response const input = createTestInput( 'resources.list.list.operation.perform', - appDefinition + appDefinition, ); input._zapier.rpc = rpc; @@ -187,7 +187,7 @@ describe('app middleware', () => { // returns 10mb regular response const bigInputCall = createTestInput( 'resources.really_big_response.list.operation.perform', - appDefinition + appDefinition, ); input._zapier.rpc = rpc; diff --git a/packages/core/test/checks.js b/packages/core/test/checks.js index 9ade66d2c..e60af7dc5 100644 --- a/packages/core/test/checks.js +++ b/packages/core/test/checks.js @@ -139,13 +139,13 @@ describe('checks', () => { { id: 2, project_id: 2, slug: 'foo' }, { id: 3, project_id: 1, slug: 'foo' }, // duplicate! ], - app + app, ); errors.length.should.eql(1); const error = errors[0]; error.should.containEql( - 'Got two or more results with primary key of `{"project_id":1,"slug":"foo"}`' + 'Got two or more results with primary key of `{"project_id":1,"slug":"foo"}`', ); }); @@ -172,7 +172,7 @@ describe('checks', () => { // non-primitive can't be used as a primary key { id: 2, project_id: 2, slug: { foo: 'bar' } }, ], - app + app, ); errors.length.should.eql(1); @@ -267,11 +267,11 @@ describe('checks', () => { 'creates.blah.operation.performBuffer', results, {}, - bundle + bundle, ); errors.length.should.eql(1); errors[0].should.match( - /missing these IDs as keys: three, four, five, and 4 more/ + /missing these IDs as keys: three, four, five, and 4 more/, ); }); @@ -297,12 +297,12 @@ describe('checks', () => { 'creates.blah.operation.performBuffer', results, {}, - bundle + bundle, ); errors.length.should.eql(2); errors[0].should.match(/member with ID 'one' must be an object/); errors[1].should.match( - /member with ID 'two' must have 'outputData' object or 'error' string/ + /member with ID 'two' must have 'outputData' object or 'error' string/, ); }); @@ -315,7 +315,7 @@ describe('checks', () => { 'creates.blah.operation.performBuffer', results, {}, - bundle + bundle, ); errors.should.be.empty(); }); @@ -375,7 +375,7 @@ describe('checkOutput', () => { (() => { checkOutput(output); }).should.throw( - /primary key of `{"timestamp":1710836622,"email":"amy@example.com"}`/ + /primary key of `{"timestamp":1710836622,"email":"amy@example.com"}`/, ); }); diff --git a/packages/core/test/create-app.js b/packages/core/test/create-app.js index acedd6178..45c223ef7 100644 --- a/packages/core/test/create-app.js +++ b/packages/core/test/create-app.js @@ -33,7 +33,7 @@ describe('create-app', () => { it('should return data from promise', (done) => { const input = createTestInput( - 'resources.workingfuncpromise.list.operation.perform' + 'resources.workingfuncpromise.list.operation.perform', ); app(input) @@ -46,7 +46,7 @@ describe('create-app', () => { it('should return data from promise (direct)', (done) => { const input = createTestInput( - 'triggers.workingfuncpromiseList.operation.perform' + 'triggers.workingfuncpromiseList.operation.perform', ); app(input) @@ -81,7 +81,7 @@ describe('create-app', () => { it('should return data from an async function call with callback', (done) => { const input = createTestInput( - 'resources.workingfuncasync.list.operation.perform' + 'resources.workingfuncasync.list.operation.perform', ); app(input) @@ -94,7 +94,7 @@ describe('create-app', () => { it('should return data from an async function call with callback (direct)', (done) => { const input = createTestInput( - 'triggers.workingfuncasyncList.operation.perform' + 'triggers.workingfuncasyncList.operation.perform', ); app(input) @@ -121,7 +121,7 @@ describe('create-app', () => { it('should fail on a live request call', async () => { const input = createTestInput( - 'resources.failerhttp.list.operation.perform' + 'resources.failerhttp.list.operation.perform', ); try { @@ -159,7 +159,7 @@ describe('create-app', () => { it('should make call via z.request with sugar url param', async () => { const input = createTestInput( - 'triggers.requestsugarList.operation.perform' + 'triggers.requestsugarList.operation.perform', ); const output = await app(input); @@ -173,7 +173,7 @@ describe('create-app', () => { it('should fail on a sync function', (done) => { const input = createTestInput( - 'resources.failerfunc.list.operation.perform' + 'resources.failerfunc.list.operation.perform', ); app(input) @@ -201,7 +201,7 @@ describe('create-app', () => { it('should fail on promise function', (done) => { const input = createTestInput( - 'resources.failerfuncpromise.list.operation.perform' + 'resources.failerfuncpromise.list.operation.perform', ); app(input) @@ -216,7 +216,7 @@ describe('create-app', () => { it('should fail on promise function (direct)', (done) => { const input = createTestInput( - 'triggers.failerfuncpromiseList.operation.perform' + 'triggers.failerfuncpromiseList.operation.perform', ); app(input) @@ -231,7 +231,7 @@ describe('create-app', () => { it('should apply HTTP after middleware', (done) => { const input = createTestInput( - 'resources.contacterror.listWithError.operation.perform' + 'resources.contacterror.listWithError.operation.perform', ); app(input) @@ -288,7 +288,7 @@ describe('create-app', () => { oauth2App(input) .then((output) => { output.results.should.eql( - 'https://my-sub.example.com?scope=read%2Cwrite' + 'https://my-sub.example.com?scope=read%2Cwrite', ); done(); }) @@ -344,7 +344,7 @@ describe('create-app', () => { }; const input = createTestInput( 'creates.rowCreate.operation.performBuffer', - bundle + bundle, ); const err = await app(input).should.be.rejected(); err.name.should.eql('CheckError'); @@ -407,7 +407,7 @@ describe('create-app', () => { }, }, true, - verifyRefreshAuthError + verifyRefreshAuthError, ); }); @@ -423,7 +423,7 @@ describe('create-app', () => { }, }, false, - verifyRefreshAuthError + verifyRefreshAuthError, ); }); @@ -439,7 +439,7 @@ describe('create-app', () => { }, }, false, - verifyResponseError + verifyResponseError, ); }); @@ -452,7 +452,7 @@ describe('create-app', () => { }, }, false, - verifyRefreshAuthError + verifyRefreshAuthError, ); }); @@ -465,7 +465,7 @@ describe('create-app', () => { }, }, false, - verifyResponseError + verifyResponseError, ); }); }); @@ -493,49 +493,49 @@ describe('create-app', () => { testInputOutputFields( 'should return static input fields', - 'triggers.staticinputfieldsList.operation.inputFields' + 'triggers.staticinputfieldsList.operation.inputFields', ); testInputOutputFields( 'should return dynamic sync input fields', - 'triggers.dynamicsyncinputfieldsList.operation.inputFields' + 'triggers.dynamicsyncinputfieldsList.operation.inputFields', ); testInputOutputFields( 'should return dynamic async input fields', - 'triggers.dynamicasyncinputfieldsList.operation.inputFields' + 'triggers.dynamicasyncinputfieldsList.operation.inputFields', ); testInputOutputFields( 'should return mix of static, sync function and promise inputFields', - 'triggers.mixedinputfieldsList.operation.inputFields' + 'triggers.mixedinputfieldsList.operation.inputFields', ); testInputOutputFields( 'should return static output fields', - 'triggers.staticinputfieldsList.operation.outputFields' + 'triggers.staticinputfieldsList.operation.outputFields', ); testInputOutputFields( 'should return dynamic sync output fields', - 'triggers.dynamicsyncinputfieldsList.operation.outputFields' + 'triggers.dynamicsyncinputfieldsList.operation.outputFields', ); testInputOutputFields( 'should return dynamic async output fields', - 'triggers.dynamicasyncinputfieldsList.operation.outputFields' + 'triggers.dynamicasyncinputfieldsList.operation.outputFields', ); testInputOutputFields( 'should return mix of static, sync function and promise outputFields', - 'triggers.mixedinputfieldsList.operation.outputFields' + 'triggers.mixedinputfieldsList.operation.outputFields', ); }); describe('hydration', () => { it('should hydrate method', async () => { const input = createTestInput( - 'resources.honkerdonker.list.operation.perform' + 'resources.honkerdonker.list.operation.perform', ); const output = await app(input); output.results.should.eql([ @@ -563,11 +563,11 @@ describe('create-app', () => { before(() => app( createTestInput( - 'resources.executeCallbackRequest.create.operation.perform' - ) + 'resources.executeCallbackRequest.create.operation.perform', + ), ).then((output) => { results = output; - }) + }), ); it('returns a CALLBACK envelope', () => @@ -617,7 +617,7 @@ describe('create-app', () => { 'What happened:', ' Executing triggers.testRequire.operation.perform with bundle', ' For technical reasons, use z.require() instead of require().', - ].join('\n') + ].join('\n'), ); } }); @@ -645,13 +645,13 @@ describe('create-app', () => { const appFail = createApp(definition); await appFail(input).should.be.rejectedWith( - /Cannot find module 'non-existing-package'/ + /Cannot find module 'non-existing-package'/, ); }); it('should be able to import from other paths using zRequire', async () => { const input = createTestInput( - 'resources.listrequire.list.operation.perform' + 'resources.listrequire.list.operation.perform', ); const appPass = createApp(appDefinition); @@ -675,7 +675,7 @@ describe('create-app', () => { method: 'resources.executeRequestAsShorthand.create.operation.perform', }; const { results } = await app( - createInput(appDefinition, event, testLogger) + createInput(appDefinition, event, testLogger), ); should(results).be.an.Object().and.not.be.an.Array(); }); @@ -699,7 +699,7 @@ describe('create-app', () => { method: 'resources.executeRequestAsShorthand.create.operation.perform', }; const { results } = await app( - createInput(appDefinition, event, testLogger) + createInput(appDefinition, event, testLogger), ); should(results).match({ foo: 'bar' }); }); @@ -716,9 +716,9 @@ describe('create-app', () => { method: 'resources.executeRequestAsShorthand.create.operation.perform', }; await app( - createInput(appDefinition, event, testLogger) + createInput(appDefinition, event, testLogger), ).should.be.rejectedWith( - /Response needs to be JSON, form-urlencoded or parsed in middleware/ + /Response needs to be JSON, form-urlencoded or parsed in middleware/, ); }); }); @@ -740,7 +740,7 @@ describe('create-app', () => { method, }; const err = await app( - createInput(appDefinition, event, testLogger) + createInput(appDefinition, event, testLogger), ).should.be.rejected(); JSON.parse(err.message).status.should.eql(400); }); @@ -765,7 +765,7 @@ describe('create-app', () => { method, }; const err = await app( - createInput(appDef, event, testLogger) + createInput(appDef, event, testLogger), ).should.be.rejected(); JSON.parse(err.message).status.should.eql(400); }); @@ -790,7 +790,7 @@ describe('create-app', () => { method, }; const { results } = await app( - createInput(appDef, event, testLogger) + createInput(appDef, event, testLogger), ).should.be.fulfilled(); results.status.should.eql(400); @@ -813,7 +813,7 @@ describe('create-app', () => { method, }; const err = await app( - createInput(appDefinition, event, testLogger) + createInput(appDefinition, event, testLogger), ).should.be.rejected(); JSON.parse(err.message).status.should.eql(400); @@ -841,7 +841,7 @@ describe('create-app', () => { method, }; const { results } = await app( - createInput(appDef, event, testLogger) + createInput(appDef, event, testLogger), ).should.be.fulfilled(); results[0].status.should.eql(400); @@ -865,7 +865,7 @@ describe('create-app', () => { method, }; const { results } = await app( - createInput(appDefinition, event, testLogger) + createInput(appDefinition, event, testLogger), ).should.be.fulfilled(); results[0].status.should.eql(400); @@ -894,7 +894,7 @@ describe('create-app', () => { method, }; const err = await app( - createInput(appDefinition, event, testLogger) + createInput(appDefinition, event, testLogger), ).should.be.rejected(); JSON.parse(err.message).status.should.eql(400); }); diff --git a/packages/core/test/create-request-client.js b/packages/core/test/create-request-client.js index 621b64776..a12bdc7fd 100644 --- a/packages/core/test/create-request-client.js +++ b/packages/core/test/create-request-client.js @@ -240,7 +240,7 @@ describe('request client', function () { ], }, {}, - testLogger + testLogger, ); const request = createAppRequestClient(inputWithBeforeMiddleware); request({ url: `${HTTPBIN_URL}/get` }) @@ -284,7 +284,7 @@ describe('request client', function () { ], }, {}, - testLogger + testLogger, ); const request = createAppRequestClient(inputWithAfterMiddleware); const response = await request({ @@ -309,7 +309,7 @@ describe('request client', function () { response.status.should.eql(200); response.request.body.should.eql( - 'name=Something+Else&directions=!!No+Way+Jos%C3%A9' + 'name=Something+Else&directions=!!No+Way+Jos%C3%A9', ); const body = JSON.parse(response.content); body.form.name.should.deepEqual(['Something Else']); @@ -329,7 +329,7 @@ describe('request client', function () { response.status.should.eql(200); response.request.body.should.eql( - 'name=Something Else&directions=!!No Way José' + 'name=Something Else&directions=!!No Way José', ); const body = JSON.parse(response.content); body.form.name.should.deepEqual(['Something Else']); @@ -359,7 +359,7 @@ describe('request client', function () { return request(`${HTTPBIN_URL}/redirect-to?url=http://example.com`).then( (response) => { response.status.should.eql(200); - } + }, ); }); @@ -478,7 +478,7 @@ describe('request client', function () { }, }; const request = createAppRequestClient( - createInput({}, event, testLogger) + createInput({}, event, testLogger), ); const responseBefore = await request({ @@ -515,7 +515,7 @@ describe('request client', function () { const body = JSON.parse(response.content); body.url.should.eql( - `${HTTPBIN_URL}/get?cool=false&name=zapier&zzz=%5B%5D&yyy=%7B%7D&qqq=%20` + `${HTTPBIN_URL}/get?cool=false&name=zapier&zzz=%5B%5D&yyy=%7B%7D&qqq=%20`, ); }); @@ -778,7 +778,7 @@ describe('request client', function () { }, }).should.be.rejectedWith( 'Cannot reliably interpolate objects or arrays into a string. ' + - 'Variable `bundle.inputData.badData` is an Array:\n"1,2,3"' + 'Variable `bundle.inputData.badData` is an Array:\n"1,2,3"', ); }); diff --git a/packages/core/test/errors.js b/packages/core/test/errors.js index bf865cde5..b03f19f4e 100644 --- a/packages/core/test/errors.js +++ b/packages/core/test/errors.js @@ -19,7 +19,7 @@ describe('errors', () => { error.should.instanceOf(errors.Error); error.name.should.eql('AppError'); error.message.should.eql( - '{"message":"My Message","code":"MyCode","status":400}' + '{"message":"My Message","code":"MyCode","status":400}', ); }); }); @@ -48,7 +48,7 @@ describe('errors', () => { error.should.instanceOf(errors.ResponseError); error.name.should.eql('ResponseError'); error.message.should.eql( - `{"status":400,"headers":{"content-type":"text/html; charset=utf-8","retry-after":60},"content":"","request":{"url":"${HTTPBIN_URL}/status/400"}}` + `{"status":400,"headers":{"content-type":"text/html; charset=utf-8","retry-after":60},"content":"","request":{"url":"${HTTPBIN_URL}/status/400"}}`, ); }); @@ -80,7 +80,7 @@ describe('errors', () => { error.should.instanceOf(errors.ResponseError); error.name.should.eql('ResponseError'); error.message.should.eql( - `{"status":401,"headers":{"content-type":"application/json","retry-after":60},"content":null,"request":{"url":"https://example.com"}}` + `{"status":401,"headers":{"content-type":"application/json","retry-after":60},"content":null,"request":{"url":"https://example.com"}}`, ); }); }); diff --git a/packages/core/test/fixtures/truncate-test-data.json b/packages/core/test/fixtures/truncate-test-data.json index c4c1ccea8..ecd2e2d5e 100644 --- a/packages/core/test/fixtures/truncate-test-data.json +++ b/packages/core/test/fixtures/truncate-test-data.json @@ -41,15 +41,8 @@ { "description": "truncateData will do its best to truncate a big string that would push it past the maxLength, but in a case where the last evaluated item isn't a string, it will just 'drop' the last evaluated item and the output length won't match the maxLength. that's okay! here's an example.", "input": [ - 1234567890, - 2345678901, - 3456789012, - 4567890123, - 5678901234, - 6789012345, - 7890123456, - 8901234567, - 9012345678 + 1234567890, 2345678901, 3456789012, 4567890123, 5678901234, 6789012345, + 7890123456, 8901234567, 9012345678 ], "maxLength": 94, "output": [ diff --git a/packages/core/test/http-middleware.js b/packages/core/test/http-middleware.js index e859983a6..fd68000de 100644 --- a/packages/core/test/http-middleware.js +++ b/packages/core/test/http-middleware.js @@ -36,7 +36,7 @@ describe('http requests', () => { [addRequestHeader], [prepareResponse], request, - { skipEnvelope: true } + { skipEnvelope: true }, ); const response = await wrappedRequest({ url: `${HTTPBIN_URL}/get` }); @@ -59,7 +59,7 @@ describe('http requests', () => { [addRequestHeader], [prepareResponse], request, - { skipEnvelope: true } + { skipEnvelope: true }, ); const response = await wrappedRequest({ @@ -83,7 +83,7 @@ describe('http requests', () => { [addRequestHeader], [prepareResponse], request, - { skipEnvelope: true } + { skipEnvelope: true }, ); wrappedRequest({ url: `${HTTPBIN_URL}/get` }).catch((err) => { @@ -104,7 +104,7 @@ describe('http requests', () => { [], [prepareResponse, addToResponseBody], request, - { skipEnvelope: true } + { skipEnvelope: true }, ); wrappedRequest({ url: `${HTTPBIN_URL}/get` }) @@ -129,7 +129,7 @@ describe('http requests', () => { [], [prepareResponse, addToResponseBody], request, - { skipEnvelope: true } + { skipEnvelope: true }, ); wrappedRequest({ url: `${HTTPBIN_URL}/get` }) @@ -373,7 +373,7 @@ describe('http querystring before middleware', () => { }; addQueryParams(req); should(req.url).eql( - 'https://example.com?name=asdf%24%24asdf&cool=qwer$$qwer' + 'https://example.com?name=asdf%24%24asdf&cool=qwer$$qwer', ); }); @@ -770,7 +770,7 @@ describe('http prepareResponse', () => { should.throws( () => response.content, Error, - /You passed {raw: true} in request()/ + /You passed {raw: true} in request()/, ); should(response.data).be.Undefined(); should(response.json).be.Undefined(); // DEPRECATED diff --git a/packages/core/test/hydration.js b/packages/core/test/hydration.js index 4a37d712d..fb9e403a1 100644 --- a/packages/core/test/hydration.js +++ b/packages/core/test/hydration.js @@ -32,7 +32,7 @@ describe('hydration', () => { (() => { dehydrate('foo', inputData); }).should.throw( - 'You must pass in a function/array/object. We got string instead.' + 'You must pass in a function/array/object. We got string instead.', ); }); @@ -41,21 +41,21 @@ describe('hydration', () => { (() => { dehydrate(funcToMiss, inputData); }).should.throw( - 'We could not find your function/array/object anywhere on your App definition.' + 'We could not find your function/array/object anywhere on your App definition.', ); }); it('should deepfind a function on the app', () => { const result = dehydrate(funcToFind); result.should.eql( - 'hydrate|||{"type":"method","method":"some.path.to","bundle":{}}|||hydrate' + 'hydrate|||{"type":"method","method":"some.path.to","bundle":{}}|||hydrate', ); }); it('should allow passing of cache expiration argument along in the dehydrated data', () => { const result = dehydrate(funcToFind, {}, 60); result.should.eql( - 'hydrate|||{"type":"method","method":"some.path.to","bundle":{},"cacheExpiration":60}|||hydrate' + 'hydrate|||{"type":"method","method":"some.path.to","bundle":{},"cacheExpiration":60}|||hydrate', ); }); @@ -71,7 +71,7 @@ describe('hydration', () => { const inputData = { key: 'value' }; const result = dehydrate(funcToFind, inputData); result.should.eql( - 'hydrate|||eyJ0eXBlIjoibWV0aG9kIiwibWV0aG9kIjoic29tZS5wYXRoLnRvIiwiYnVuZGxlIjp7ImtleSI6InZhbHVlIn19:Xp29ksdiVvXpnXXA3jXSdA3JkbM=|||hydrate' + 'hydrate|||eyJ0eXBlIjoibWV0aG9kIiwibWV0aG9kIjoic29tZS5wYXRoLnRvIiwiYnVuZGxlIjp7ImtleSI6InZhbHVlIn19:Xp29ksdiVvXpnXXA3jXSdA3JkbM=|||hydrate', ); }); }); @@ -86,7 +86,7 @@ describe('hydration', () => { (() => { dehydrateFile(funcToMiss, inputData); }).should.throw( - 'We could not find your function/array/object anywhere on your App definition.' + 'We could not find your function/array/object anywhere on your App definition.', ); }); @@ -94,7 +94,7 @@ describe('hydration', () => { const inputData = { key: 'value' }; const result = dehydrateFile(funcToFind, inputData); result.should.eql( - 'hydrate|||{"type":"file","method":"some.path.to","bundle":{"key":"value"}}|||hydrate' + 'hydrate|||{"type":"file","method":"some.path.to","bundle":{"key":"value"}}|||hydrate', ); }); @@ -102,7 +102,7 @@ describe('hydration', () => { const inputData = { key: 'value' }; const result = dehydrateFile(funcToFind, inputData, 60); result.should.eql( - 'hydrate|||{"type":"file","method":"some.path.to","bundle":{"key":"value"},"cacheExpiration":60}|||hydrate' + 'hydrate|||{"type":"file","method":"some.path.to","bundle":{"key":"value"},"cacheExpiration":60}|||hydrate', ); }); @@ -118,7 +118,7 @@ describe('hydration', () => { const inputData = { key: 'value' }; const result = dehydrateFile(funcToFind, inputData); result.should.eql( - 'hydrate|||eyJ0eXBlIjoiZmlsZSIsIm1ldGhvZCI6InNvbWUucGF0aC50byIsImJ1bmRsZSI6eyJrZXkiOiJ2YWx1ZSJ9fQ==:5QJ6kP3xyaJu0ENOfrLEIENT6/w=|||hydrate' + 'hydrate|||eyJ0eXBlIjoiZmlsZSIsIm1ldGhvZCI6InNvbWUucGF0aC50byIsImJ1bmRsZSI6eyJrZXkiOiJ2YWx1ZSJ9fQ==:5QJ6kP3xyaJu0ENOfrLEIENT6/w=|||hydrate', ); }); }); diff --git a/packages/core/test/logger.js b/packages/core/test/logger.js index c7c3119ed..91464ed48 100644 --- a/packages/core/test/logger.js +++ b/packages/core/test/logger.js @@ -42,7 +42,7 @@ const prepareTestRequest = ({ }, content: resBody, - } + }, ); describe('logger', () => { diff --git a/packages/core/test/misc-tools.js b/packages/core/test/misc-tools.js index f55aaf14c..4d96d038b 100644 --- a/packages/core/test/misc-tools.js +++ b/packages/core/test/misc-tools.js @@ -95,7 +95,7 @@ describe('Tools', () => { tests.forEach((test) => { should( - dataTools.simpleTruncate(test.value, test.length, test.suffix) + dataTools.simpleTruncate(test.value, test.length, test.suffix), ).eql(test.expected); }); }); @@ -232,7 +232,7 @@ describe('Tools', () => { h: 5, i: undefined, }, - { preserve: { 'a.d': true } } + { preserve: { 'a.d': true } }, ); output.should.eql({ @@ -397,7 +397,7 @@ describe('Tools', () => { { name: 'TypeError', message: "Type 'undefined' is not JSON-encodable (path: '')", - } + }, ); assert.throws( () => { @@ -406,7 +406,7 @@ describe('Tools', () => { { name: 'TypeError', message: "Type 'object' is not JSON-encodable (path: '')", - } + }, ); assert.throws( () => { @@ -415,7 +415,7 @@ describe('Tools', () => { { name: 'TypeError', message: "Type 'object' is not JSON-encodable (path: '')", - } + }, ); assert.throws( () => { @@ -424,7 +424,7 @@ describe('Tools', () => { { name: 'TypeError', message: "Type 'undefined' is not JSON-encodable (path: 'foo.1.xyz')", - } + }, ); assert.throws( () => { @@ -433,7 +433,7 @@ describe('Tools', () => { { name: 'TypeError', message: "Type 'function' is not JSON-encodable (path: '')", - } + }, ); assert.throws( () => { @@ -441,8 +441,9 @@ describe('Tools', () => { }, { name: 'TypeError', - message: "Type 'function' is not JSON-encodable (path: 'foo.1.hello')", - } + message: + "Type 'function' is not JSON-encodable (path: 'foo.1.hello')", + }, ); assert.throws( () => { @@ -454,7 +455,7 @@ describe('Tools', () => { name: 'TypeError', message: "Circular structure is not JSON-encodable (path: 'items.0.self')", - } + }, ); }); }); diff --git a/packages/core/test/moduleuserapp/export-func.js b/packages/core/test/moduleuserapp/export-func.js index 23b95593e..a7f59d6c2 100644 --- a/packages/core/test/moduleuserapp/export-func.js +++ b/packages/core/test/moduleuserapp/export-func.js @@ -1,3 +1,3 @@ module.exports = (z, bundle) => { - return [{ id: 1234 }] || bundle; + return [{ id: 1234 }]; }; diff --git a/packages/core/test/request-tools.js b/packages/core/test/request-tools.js index 7d109bb13..02e71d5d4 100644 --- a/packages/core/test/request-tools.js +++ b/packages/core/test/request-tools.js @@ -7,7 +7,7 @@ describe('request tools', () => { it('should merge requests', () => { const request = requestMerge( { params: { 'api-key': 'dcba' }, headers: { 'ApI-kEy': 'abcd' } }, - { url: 'https://example.com?cat=mouse', params: { hello: 'world' } } + { url: 'https://example.com?cat=mouse', params: { hello: 'world' } }, ); const expected = { method: 'GET', @@ -28,7 +28,7 @@ describe('request tools', () => { it('should drop headers', () => { const request = requestMerge( { url: 'https://example.com', headers: { 'api-key': 'abcd' } }, - { headers: { 'api-key': '' } } + { headers: { 'api-key': '' } }, ); const expected = { method: 'GET', @@ -44,7 +44,7 @@ describe('request tools', () => { it('should overwrite headers, case insensitively, and by order', () => { let request = requestMerge( { url: 'https://example.com', headers: { 'api-key': 'abcd' } }, - { headers: { 'api-Key': 'efgh' } } + { headers: { 'api-Key': 'efgh' } }, ); let expected = { method: 'GET', @@ -62,7 +62,7 @@ describe('request tools', () => { url: 'https://example.com', headers: { 'api-key': 'abcd', Token: '123', 'User-Agent': 'Zapier' }, }, - { headers: { 'api-key': 'efgh', tOken: '754' } } + { headers: { 'api-key': 'efgh', tOken: '754' } }, ); expected = { method: 'GET', diff --git a/packages/core/test/test-should-paginate.js b/packages/core/test/test-should-paginate.js index 7de6300e5..055c21928 100644 --- a/packages/core/test/test-should-paginate.js +++ b/packages/core/test/test-should-paginate.js @@ -18,7 +18,7 @@ describe('shouldPaginate', () => { }, }, }, - 'triggers.trigger.operation.perform' + 'triggers.trigger.operation.perform', ).should.eql(true); }); @@ -34,7 +34,7 @@ describe('shouldPaginate', () => { }, }, }, - 'triggers.trigger.operation.perform' + 'triggers.trigger.operation.perform', ).should.eql(false); }); @@ -50,7 +50,7 @@ describe('shouldPaginate', () => { }, }, }, - 'triggers.trigger.operation.perform' + 'triggers.trigger.operation.perform', ).should.eql(true); }); @@ -65,7 +65,7 @@ describe('shouldPaginate', () => { }, }, }, - 'triggers.trigger.operation.perform' + 'triggers.trigger.operation.perform', ).should.eql(false); }); @@ -84,11 +84,11 @@ describe('shouldPaginate', () => { }; shouldPaginate( definition, - 'triggers.trigger.operation.perform' + 'triggers.trigger.operation.perform', ).should.equal(false); shouldPaginate( definition, - 'triggers.trigger.operation.performList' + 'triggers.trigger.operation.performList', ).should.equal(true); }); @@ -106,11 +106,11 @@ describe('shouldPaginate', () => { }; shouldPaginate( definition, - 'triggers.trigger.operation.perform' + 'triggers.trigger.operation.perform', ).should.equal(false); shouldPaginate( definition, - 'triggers.trigger.operation.performList' + 'triggers.trigger.operation.performList', ).should.equal(false); }); @@ -128,7 +128,7 @@ describe('shouldPaginate', () => { }, }, }, - 'resources.resource.list.operation.perform' + 'resources.resource.list.operation.perform', ).should.eql(true); }); @@ -145,7 +145,7 @@ describe('shouldPaginate', () => { }, }, }, - 'resources.resource.list.operation.perform' + 'resources.resource.list.operation.perform', ).should.eql(false); }); @@ -165,11 +165,11 @@ describe('shouldPaginate', () => { }; shouldPaginate( definition, - 'resources.resource.hook.operation.perform' + 'resources.resource.hook.operation.perform', ).should.equal(false); shouldPaginate( definition, - 'resources.resource.hook.operation.performList' + 'resources.resource.hook.operation.performList', ).should.equal(true); }); @@ -188,11 +188,11 @@ describe('shouldPaginate', () => { }; shouldPaginate( definition, - 'resources.resource.hook.operation.perform' + 'resources.resource.hook.operation.perform', ).should.equal(false); shouldPaginate( definition, - 'resources.resource.hook.operation.performList' + 'resources.resource.hook.operation.performList', ).should.equal(false); }); }); diff --git a/packages/core/test/test-tools.js b/packages/core/test/test-tools.js index 6e49684f8..a67edcedc 100644 --- a/packages/core/test/test-tools.js +++ b/packages/core/test/test-tools.js @@ -11,7 +11,7 @@ describe('test-tools', () => { it('should run an explicit path', async () => { const results = await appTester( - appDefinition.resources.list.list.operation.perform + appDefinition.resources.list.list.operation.perform, ); results.should.eql([{ id: 1234 }, { id: 5678 }]); }); @@ -34,7 +34,7 @@ describe('test-tools', () => { functionsWork: z.hash('md5', 'david'), zRequestExists: Boolean(z.request), }), - { authData: { secret: 'password' } } + { authData: { secret: 'password' } }, ); results.should.eql({ @@ -63,16 +63,20 @@ describe('test-tools', () => { // retrieves custom fields from API appTester.zcacheTestObj.should.eql({}); const freshResults = await appTester( - appDefinition.resources.cachedcustominputfields.list.operation.inputFields, + appDefinition.resources.cachedcustominputfields.list.operation + .inputFields, {}, true, ); freshResults.should.eql(customInputFields); // retrieves custom fields from cache - _.values(appTester.zcacheTestObj).should.containDeep([JSON.stringify(customInputFields)]); + _.values(appTester.zcacheTestObj).should.containDeep([ + JSON.stringify(customInputFields), + ]); const cachedResults = await appTester( - appDefinition.resources.cachedcustominputfields.list.operation.inputFields, + appDefinition.resources.cachedcustominputfields.list.operation + .inputFields, {}, ); cachedResults.should.eql(customInputFields); diff --git a/packages/core/test/tools/callback-wrapper.js b/packages/core/test/tools/callback-wrapper.js index ace0c8afd..9c07847f9 100644 --- a/packages/core/test/tools/callback-wrapper.js +++ b/packages/core/test/tools/callback-wrapper.js @@ -25,7 +25,7 @@ describe('callbackwrapper', () => { should.not.exist(input._zapier.event.callbackUsed); }); it('should set the isUsed property', () => { - wrapper(); // eslint-disable-line no-unused-expressions + wrapper(); input._zapier.event.callbackUsed.should.eql(true); }); }); diff --git a/packages/core/test/tools/create-cache.js b/packages/core/test/tools/create-cache.js index 4af419a92..63cacf816 100644 --- a/packages/core/test/tools/create-cache.js +++ b/packages/core/test/tools/create-cache.js @@ -63,7 +63,7 @@ describe('zcache: get, set, delete', () => { await cache .set(key, value) .should.be.rejectedWith( - "Type 'function' is not JSON-encodable (path: '')" + "Type 'function' is not JSON-encodable (path: '')", ); }); @@ -114,21 +114,21 @@ describe('zcache: get, set, delete', () => { await cache .set('key', 'ok', 1, 'bad') .should.be.rejectedWith( - 'scope must be an array of strings with values "user" or "auth"' + 'scope must be an array of strings with values "user" or "auth"', ); }); it('zcache_set: bad scope is not ok', async () => { await cache .set('key', 'ok', 1, ['bad', 'scope']) .should.be.rejectedWith( - 'scope must be an array of strings with values "user" or "auth"' + 'scope must be an array of strings with values "user" or "auth"', ); }); it('zcache_set: mix of good and bad is not ok', async () => { await cache .set('key', 'ok', 1, ['bad', 'auth']) .should.be.rejectedWith( - 'scope must be an array of strings with values "user" or "auth"' + 'scope must be an array of strings with values "user" or "auth"', ); }); }); diff --git a/packages/core/test/tools/create-http-patch.js b/packages/core/test/tools/create-http-patch.js index 1d90d72b5..e93a82f73 100644 --- a/packages/core/test/tools/create-http-patch.js +++ b/packages/core/test/tools/create-http-patch.js @@ -225,7 +225,7 @@ describe('create http patch', () => { const loggedIds = Array.from( log.response_content.matchAll(/"id":(\d+)/g), - (m) => m[1] + (m) => m[1], ); should(loggedIds).have.length(50); for (let i = 0; i < loggedIds.length; i++) { @@ -237,7 +237,7 @@ describe('create http patch', () => { done(); }); }); - } + }, ); req.end(); }); @@ -257,6 +257,6 @@ describe('create http patch', () => { await appTester(appDefinition.resources.list.list.operation.perform); const http = require('http'); // core modules are never cached should(http.patchedByZapier).eql(undefined); - } + }, ); }); diff --git a/packages/core/test/tools/file-stasher.js b/packages/core/test/tools/file-stasher.js index 6865d9e5e..df72a3627 100644 --- a/packages/core/test/tools/file-stasher.js +++ b/packages/core/test/tools/file-stasher.js @@ -68,7 +68,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('text/plain'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="unnamedfile.txt"' + 'attachment; filename="unnamedfile.txt"', ); should(await s3Response.text()).eql(file); }); @@ -83,10 +83,10 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).eql( - 'application/octet-stream' + 'application/octet-stream', ); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="unnamedfile"' + 'attachment; filename="unnamedfile"', ); should(await s3Response.buffer()).eql(file); }); @@ -104,7 +104,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('text/plain'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="test.txt"' + 'attachment; filename="test.txt"', ); const expectedHash = await sha1(fs.createReadStream(filePath)); @@ -125,7 +125,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('text/plain'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="test.txt"' + 'attachment; filename="test.txt"', ); const expectedHash = await sha1(fs.createReadStream(filePath)); @@ -141,7 +141,7 @@ describe('file upload', () => { const knownLength = fs.statSync(filePath).size; await stashFile(file, knownLength - 1).should.be.rejectedWith( - /MalformedPOSTRequest/ + /MalformedPOSTRequest/, ); }); @@ -154,7 +154,7 @@ describe('file upload', () => { const knownLength = UPLOAD_MAX_SIZE + 1; await stashFile(file, knownLength).should.be.rejectedWith( - `${knownLength} bytes is too big, ${UPLOAD_MAX_SIZE} is the max for streaming data.` + `${knownLength} bytes is too big, ${UPLOAD_MAX_SIZE} is the max for streaming data.`, ); }); @@ -166,7 +166,7 @@ describe('file upload', () => { const knownLength = NON_STREAM_UPLOAD_MAX_SIZE + 1; await stashFile(file, knownLength).should.be.rejectedWith( - `${knownLength} bytes is too big, ${NON_STREAM_UPLOAD_MAX_SIZE} is the max for non-streaming data.` + `${knownLength} bytes is too big, ${NON_STREAM_UPLOAD_MAX_SIZE} is the max for non-streaming data.`, ); }); @@ -178,7 +178,7 @@ describe('file upload', () => { const knownLength = NON_STREAM_UPLOAD_MAX_SIZE + 1; await stashFile(file, knownLength).should.be.rejectedWith( - `${knownLength} bytes is too big, ${NON_STREAM_UPLOAD_MAX_SIZE} is the max for non-streaming data.` + `${knownLength} bytes is too big, ${NON_STREAM_UPLOAD_MAX_SIZE} is the max for non-streaming data.`, ); }); @@ -195,7 +195,7 @@ describe('file upload', () => { const knownLength = Buffer.byteLength(file); await stashFile(file, knownLength, filename).should.be.rejectedWith( - `URI-Encoded Filename is too long at ${encodedLength}, ${ENCODED_FILENAME_MAX_LENGTH} is the max.` + `URI-Encoded Filename is too long at ${encodedLength}, ${ENCODED_FILENAME_MAX_LENGTH} is the max.`, ); }); @@ -225,10 +225,10 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).eql( - 'application/octet-stream' + 'application/octet-stream', ); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="unnamedfile"' + 'attachment; filename="unnamedfile"', ); should(await s3Response.buffer()).eql(buffer); }); @@ -245,7 +245,7 @@ describe('file upload', () => { const file = fs.createReadStream(path.join(__dirname, 'test.txt')); await stashFileTest(file).should.be.rejectedWith( - /Files can only be stashed within a create or hydration function\/method/ + /Files can only be stashed within a create or hydration function\/method/, ); }); @@ -261,7 +261,7 @@ describe('file upload', () => { const file = fs.createReadStream(path.join(__dirname, 'test.txt')); await stashFileTest(file).should.be.rejectedWith( - /Files can only be stashed within a create or hydration function\/method/ + /Files can only be stashed within a create or hydration function\/method/, ); }); @@ -285,7 +285,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('text/plain'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="unnamedfile.txt"' + 'attachment; filename="unnamedfile.txt"', ); // This is what you get when you: @@ -311,7 +311,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('application/json'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="an example.json"' + 'attachment; filename="an example.json"', ); }); @@ -333,7 +333,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('application/json'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="response-headers.json"' + 'attachment; filename="response-headers.json"', ); }); @@ -351,7 +351,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).eql('image/png'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="png.png"' + 'attachment; filename="png.png"', ); // This is what you get when you: @@ -377,7 +377,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('application/json'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="gzip.json"' + 'attachment; filename="gzip.json"', ); const data = await s3Response.json(); @@ -399,7 +399,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('application/xml'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="xml.xml"' + 'attachment; filename="xml.xml"', ); // This is what you get when you: @@ -420,7 +420,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('text/plain'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="unnamedfile.txt"' + 'attachment; filename="unnamedfile.txt"', ); should(await s3Response.text()).eql('hello world'); }); @@ -444,7 +444,7 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).startWith('text/html'); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="html.html"' + 'attachment; filename="html.html"', ); // This is what you get when you: @@ -482,10 +482,10 @@ describe('file upload', () => { const s3Response = await request({ url, raw: true }); should(s3Response.getHeader('content-type')).eql( - 'application/octet-stream' + 'application/octet-stream', ); should(s3Response.getHeader('content-disposition')).eql( - 'attachment; filename="unnamedfile"' + 'attachment; filename="unnamedfile"', ); const expectedHash = await sha1(fileToHash); diff --git a/packages/core/test/tools/promise.js b/packages/core/test/tools/promise.js index b08be8141..ce8532f22 100644 --- a/packages/core/test/tools/promise.js +++ b/packages/core/test/tools/promise.js @@ -29,7 +29,7 @@ describe('contextual promise', () => { it('should contextify errors raised in then handler', (done) => { const promise = ZapierPromise.resolve({}).bind( - ZapierPromise.makeContext(contextifyErrorFn) + ZapierPromise.makeContext(contextifyErrorFn), ); promise @@ -50,7 +50,7 @@ describe('contextual promise', () => { it('should not contextify errors that have opted out', (done) => { const promise = ZapierPromise.resolve({}).bind( - ZapierPromise.makeContext(contextifyErrorFn) + ZapierPromise.makeContext(contextifyErrorFn), ); promise @@ -68,7 +68,7 @@ describe('contextual promise', () => { }) .catch((err) => { err.message.should.eql( - '{"status":400,"headers":{},"content":"","request":{"url":""}}' + '{"status":400,"headers":{},"content":"","request":{"url":""}}', ); done(); }) @@ -77,7 +77,7 @@ describe('contextual promise', () => { it.skip('should contextify errors thrown by promises returned from then handler', (done) => { const promise = ZapierPromise.resolve({}).bind( - ZapierPromise.makeContext(contextifyErrorFn) + ZapierPromise.makeContext(contextifyErrorFn), ); promise @@ -95,7 +95,7 @@ describe('contextual promise', () => { it.skip('should contextify errors rejected by promises returned from then handler', (done) => { const promise = ZapierPromise.resolve({}).bind( - ZapierPromise.makeContext(contextifyErrorFn) + ZapierPromise.makeContext(contextifyErrorFn), ); promise @@ -126,7 +126,7 @@ describe('contextual promise', () => { it('should handle two arg .then calls', (done) => { const promise = ZapierPromise.resolve({}).bind( - ZapierPromise.makeContext(contextifyErrorFn) + ZapierPromise.makeContext(contextifyErrorFn), ); promise @@ -138,14 +138,14 @@ describe('contextual promise', () => { (err) => { err.message.should.eql('whoops contextified!'); done(); - } + }, ) .catch(done); }); it('should inject context on chained promises', (done) => { const promise = ZapierPromise.resolve({}).bind( - ZapierPromise.makeContext(contextifyErrorFn) + ZapierPromise.makeContext(contextifyErrorFn), ); promise diff --git a/packages/core/test/tools/resolve-method-path.js b/packages/core/test/tools/resolve-method-path.js index 8ee200291..24adeaa21 100644 --- a/packages/core/test/tools/resolve-method-path.js +++ b/packages/core/test/tools/resolve-method-path.js @@ -25,61 +25,61 @@ describe('resolve-method-path', () => { it('should resolve a request method object with a url', () => { resolveMethodPath( app, - app.resources.contacterror.list.operation.perform + app.resources.contacterror.list.operation.perform, ).should.eql('resources.contacterror.list.operation.perform'); }); it('should resolve a method in a module', () => { resolveMethodPath(moduleApp, moduleApp.authentication.test).should.eql( - 'authentication.test' + 'authentication.test', ); resolveMethodPath( moduleApp, - moduleAppDefinition.authentication.oauth2Config.authorizeUrl + moduleAppDefinition.authentication.oauth2Config.authorizeUrl, ).should.eql('authentication.oauth2Config.authorizeUrl'); }); it('should resolve an inputFields array', () => { resolveMethodPath( app, - app.resources.contact.list.operation.inputFields + app.resources.contact.list.operation.inputFields, ).should.eql('resources.contact.list.operation.inputFields'); }); it('should resolve a function', () => { resolveMethodPath( app, - app.creates.contactCreate.operation.perform + app.creates.contactCreate.operation.perform, ).should.eql('creates.contactCreate.operation.perform'); resolveMethodPath( app, - app.triggers.contactList.operation.perform + app.triggers.contactList.operation.perform, ).should.eql('triggers.contactList.operation.perform'); resolveMethodPath(app, app.hydrators.getBigStuff).should.eql( - 'hydrators.getBigStuff' + 'hydrators.getBigStuff', ); }); it('should resolve authentication paths', () => { const authApp = schemaTools.prepareApp(oauthAppDef); resolveMethodPath(authApp, authApp.authentication.test).should.eql( - 'authentication.test' + 'authentication.test', ); resolveMethodPath( authApp, - authApp.authentication.oauth2Config.getAccessToken + authApp.authentication.oauth2Config.getAccessToken, ).should.eql('authentication.oauth2Config.getAccessToken'); // oauthAppDef !== authApp due to prepareApp() - so make sure isEqual is used resolveMethodPath( authApp, - oauthAppDef.authentication.oauth2Config.authorizeUrl + oauthAppDef.authentication.oauth2Config.authorizeUrl, ).should.eql('authentication.oauth2Config.authorizeUrl'); resolveMethodPath( authApp, - authApp.authentication.oauth2Config.authorizeUrl + authApp.authentication.oauth2Config.authorizeUrl, ).should.eql('authentication.oauth2Config.authorizeUrl'); }); @@ -89,7 +89,7 @@ describe('resolve-method-path', () => { for (let i = 1000; i >= 0; i--) { resolveMethodPath( authApp, - oauthAppDef.authentication.oauth2Config.authorizeUrl + oauthAppDef.authentication.oauth2Config.authorizeUrl, ); } }); diff --git a/packages/core/test/tools/rpc-client.js b/packages/core/test/tools/rpc-client.js index b59a4e27b..d2a6f6b74 100644 --- a/packages/core/test/tools/rpc-client.js +++ b/packages/core/test/tools/rpc-client.js @@ -26,7 +26,7 @@ describe('rpc client', () => { }) .catch((err) => { err.message.should.eql( - 'RPC request failed after 3 attempts: this is an expected explosion' + 'RPC request failed after 3 attempts: this is an expected explosion', ); }); }); diff --git a/packages/core/test/tools/schema-tools.js b/packages/core/test/tools/schema-tools.js index e87c4a6dd..01988d642 100644 --- a/packages/core/test/tools/schema-tools.js +++ b/packages/core/test/tools/schema-tools.js @@ -69,7 +69,7 @@ describe('schema-tools', () => { const app = schemaTools.findSourceRequireFunctions(appRaw); return app.beforeRequest[0]( Promise.resolve(123), - Promise.resolve(456) + Promise.resolve(456), ).should.finally.eql(579); }); }); diff --git a/packages/core/test/tools/schema.js b/packages/core/test/tools/schema.js index e158e7556..912fb5c61 100644 --- a/packages/core/test/tools/schema.js +++ b/packages/core/test/tools/schema.js @@ -60,21 +60,21 @@ describe('schema', () => { compiledApp.triggers.fooList.operation.outputFields.should.have.length(2); compiledApp.triggers.fooList.operation.sample.should.have.keys( 'id', - 'name' + 'name', ); compiledApp.searches.fooSearch.operation.outputFields.should.have.length( - 2 + 2, ); compiledApp.searches.fooSearch.operation.sample.should.have.keys( 'id', - 'name' + 'name', ); compiledApp.creates.fooCreate.operation.outputFields.should.have.length( - 2 + 2, ); compiledApp.creates.fooCreate.operation.sample.should.have.keys( 'id', - 'name' + 'name', ); }); @@ -426,7 +426,7 @@ describe('schema', () => { compiledApp.searches.findFoo.operation.outputFields.should.have.length(2); compiledApp.searches.findFoo.operation.sample.should.have.keys( 'id', - 'name' + 'name', ); }); @@ -467,7 +467,7 @@ describe('schema', () => { compiledApp.creates.makeFoo.operation.outputFields.should.have.length(2); compiledApp.creates.makeFoo.operation.sample.should.have.keys( 'id', - 'name' + 'name', ); }); diff --git a/packages/core/test/userapp/helpers.js b/packages/core/test/userapp/helpers.js index ba5054daa..6e6d4f87f 100644 --- a/packages/core/test/userapp/helpers.js +++ b/packages/core/test/userapp/helpers.js @@ -5,10 +5,7 @@ module.exports = { getCustomFields: async (z, bundle) => { const expensiveCustomFieldsRequestMock = async () => { return { - data: [ - { key: 'custom-field-1' }, - { key: 'custom-field-2' }, - ], + data: [{ key: 'custom-field-1' }, { key: 'custom-field-2' }], }; }; diff --git a/packages/legacy-scripting-runner/bundle.js b/packages/legacy-scripting-runner/bundle.js index 9d0f53d70..99b875fb6 100644 --- a/packages/legacy-scripting-runner/bundle.js +++ b/packages/legacy-scripting-runner/bundle.js @@ -101,7 +101,7 @@ const addInputData = (event, bundle, convertedBundle) => { } else if (event.name.startsWith('auth.oauth2.token')) { // Overwrite convertedBundle.auth_fields with bundle.inputData convertedBundle.auth_fields = Object.keys( - convertedBundle.auth_fields + convertedBundle.auth_fields, ).reduce((result, k) => { result[k] = bundle.inputData[k] || convertedBundle.auth_fields[k]; return result; @@ -116,7 +116,7 @@ const addHookData = (event, bundle, convertedBundle) => { if (!convertedBundle.request.querystring) { convertedBundle.request.querystring = convertToQueryString( - bundle.inputData + bundle.inputData, ); } if (!convertedBundle.request.content) { @@ -139,12 +139,12 @@ const addHookData = (event, bundle, convertedBundle) => { const addRequestData = async (event, z, bundle, convertedBundle) => { Object.assign( convertedBundle.request.headers, - _.get(bundle, 'request.headers') + _.get(bundle, 'request.headers'), ); Object.assign( convertedBundle.request.params, - _.get(bundle, 'request.params') + _.get(bundle, 'request.params'), ); const body = _.get(bundle, 'request.body'); @@ -163,10 +163,10 @@ const addRequestData = async (event, z, bundle, convertedBundle) => { }, {}); const fileFieldKeys = Object.keys(body).filter((k) => - isFileField(k, bundle) + isFileField(k, bundle), ); const fileMetas = await Promise.all( - fileFieldKeys.map((k) => LazyFile(body[k]).meta()) + fileFieldKeys.map((k) => LazyFile(body[k]).meta()), ); files = _.zip(fileFieldKeys, fileMetas) @@ -291,7 +291,7 @@ const bundleConverter = async (bundle, event, z) => { if (bundle._legacyUrl) { convertedBundle.raw_url = convertedBundle.url_raw = undoCurlyReplacement( - bundle._legacyUrl + bundle._legacyUrl, ); } diff --git a/packages/legacy-scripting-runner/ci-test.js b/packages/legacy-scripting-runner/ci-test.js index 92805a99f..a44e2da0d 100755 --- a/packages/legacy-scripting-runner/ci-test.js +++ b/packages/legacy-scripting-runner/ci-test.js @@ -21,5 +21,5 @@ const child = childProcess.exec(cmd); child.stdout.pipe(process.stdout); child.stderr.pipe(process.stderr); child.on('exit', (code) => - console.log(`Finished with code "${code.toString()}"!`) + console.log(`Finished with code "${code.toString()}"!`), ); diff --git a/packages/legacy-scripting-runner/exceptions.js b/packages/legacy-scripting-runner/exceptions.js index cd06cbd55..f83e869c3 100644 --- a/packages/legacy-scripting-runner/exceptions.js +++ b/packages/legacy-scripting-runner/exceptions.js @@ -10,7 +10,7 @@ class AppError extends Error { message, code, status, - }) + }), ); this.name = 'AppError'; this.doNotContextify = true; @@ -45,7 +45,7 @@ const cliErrors = _.reduce( }, { Error: AppError, - } + }, ); const exceptions = { diff --git a/packages/legacy-scripting-runner/index.js b/packages/legacy-scripting-runner/index.js index a89253700..cebd0d972 100644 --- a/packages/legacy-scripting-runner/index.js +++ b/packages/legacy-scripting-runner/index.js @@ -139,7 +139,7 @@ const makeMultipartForm = async (data, lazyFilesObject) => { _.zip(fileFieldKeys, fileMetas, fileStreams).forEach( ([k, meta, fileStream]) => { form.append(k, fileStream, meta); - } + }, ); return form; @@ -161,7 +161,7 @@ const addFilesToRequestBodyFromPreResult = async (request, event) => { lazyFile = LazyFile( newFileValue, { filename, contentType }, - { dontLoadUrl: !loadUrl } + { dontLoadUrl: !loadUrl }, ); } else if (typeof file === 'string') { lazyFile = LazyFile(file); @@ -172,7 +172,7 @@ const addFilesToRequestBodyFromPreResult = async (request, event) => { } return result; }, - {} + {}, ); delete request.headers['Content-Type']; @@ -476,7 +476,7 @@ const compileLegacyScriptingSource = (source, zcli, app, logger) => { 'ExpiredAuthException', 'RefreshTokenException', 'InvalidSessionException', - source + '\nreturn Zap;' + source + '\nreturn Zap;', )( underscore, require('crypto'), @@ -495,7 +495,7 @@ const compileLegacyScriptingSource = (source, zcli, app, logger) => { StopRequestException, ExpiredAuthException, RefreshTokenException, - InvalidSessionException + InvalidSessionException, ); }; @@ -503,7 +503,7 @@ const applyBeforeMiddleware = (befores, request, z, bundle) => { befores = befores || []; return befores.reduce( (prev, cur) => prev.then((req) => cur(req, z, bundle)), - Promise.resolve(request) + Promise.resolve(request), ); }; @@ -739,7 +739,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { // To know if request.files is changed by scripting event.originalFiles = _.cloneDeep( - _.get(convertedBundle, 'request.files') || {} + _.get(convertedBundle, 'request.files') || {}, ); const method = Zap[methodName].bind(Zap); @@ -779,7 +779,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { preEventName, postEventName, fullEventName, - options + options, ) => { options = { // Options to deal with the final result returned by this function. @@ -911,7 +911,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { result = await runEvent( { key, name: postEventName, response }, zcli, - bundle + bundle, ); } catch (error) { scriptError = error; @@ -978,14 +978,14 @@ const legacyScriptingRunner = (Zap, zcli, input) => { const runOAuth1GetRequestToken = (bundle) => { const url = _.get( app, - 'legacy.authentication.oauth1Config.requestTokenUrl' + 'legacy.authentication.oauth1Config.requestTokenUrl', ); const templateContext = { ...bundle.authData, ...bundle.inputData }; const consumerKey = renderTemplate(process.env.CLIENT_ID, templateContext); const consumerSecret = renderTemplate( process.env.CLIENT_SECRET, - templateContext + templateContext, ); return fetchOAuth1Token(url, { @@ -1022,7 +1022,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { const consumerKey = renderTemplate(process.env.CLIENT_ID, templateContext); const consumerSecret = renderTemplate( process.env.CLIENT_SECRET, - templateContext + templateContext, ); return fetchOAuth1Token(url, { @@ -1077,11 +1077,11 @@ const legacyScriptingRunner = (Zap, zcli, input) => { const clientId = renderTemplate(process.env.CLIENT_ID, templateContext); const clientSecret = renderTemplate( process.env.CLIENT_SECRET, - templateContext + templateContext, ); const authFieldKeys = (_.get(app, 'authentication.fields') || []).map( - (f) => f.key + (f) => f.key, ); authFieldKeys.push('_zapier_account_id'); @@ -1109,7 +1109,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { 'auth.oauth2.token.pre', 'auth.oauth2.token.post', undefined, - { defaultToResponse: true } + { defaultToResponse: true }, ); } catch (err) { if (err.name !== 'ResponseError' || Zap.pre_oauthv2_token) { @@ -1131,7 +1131,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { 'auth.oauth2.token.pre', 'auth.oauth2.token.post', undefined, - { defaultToResponse: true } + { defaultToResponse: true }, ); } @@ -1141,7 +1141,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { const runOAuth2RefreshAccessToken = async (bundle) => { const url = _.get( app, - 'legacy.authentication.oauth2Config.refreshTokenUrl' + 'legacy.authentication.oauth2Config.refreshTokenUrl', ); const request = bundle.request; @@ -1155,7 +1155,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { const clientId = renderTemplate(process.env.CLIENT_ID, templateContext); const clientSecret = renderTemplate( process.env.CLIENT_SECRET, - templateContext + templateContext, ); const body = request.body; @@ -1227,7 +1227,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { 'trigger.pre', 'trigger.post', 'trigger.poll', - { ensureType } + { ensureType }, ); if (needsFlattenedData) { @@ -1322,7 +1322,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { bundle, key, 'trigger.hook.subscribe.pre', - 'trigger.hook.subscribe.post' + 'trigger.hook.subscribe.post', ); }; @@ -1347,7 +1347,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { 'trigger.hook.unsubscribe.pre', undefined, undefined, - { parseResponse: false } + { parseResponse: false }, ); }; @@ -1356,7 +1356,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { key, typeOf, url, - supportFullMethod = true + supportFullMethod = true, ) => { let preEventName, postEventName, fullEventName; if (url) { @@ -1380,7 +1380,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { preEventName, postEventName, fullEventName, - { ensureType: 'array-wrap', resetRequestForFullMethod: true } + { ensureType: 'array-wrap', resetRequestForFullMethod: true }, ); return cleanCustomFields(fields); }; @@ -1438,7 +1438,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { 'create.pre', 'create.post', 'create.write', - { ensureType: 'object-first' } + { ensureType: 'object-first' }, ); }; @@ -1473,7 +1473,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { 'search.pre', 'search.post', 'search.search', - { ensureType: 'array-first' } + { ensureType: 'array-first' }, ); }; @@ -1487,7 +1487,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { 'search.resource.pre', 'search.resource.post', 'search.resource', - { parseResponseForPostMethod: true, ensureType: 'object-first' } + { parseResponseForPostMethod: true, ensureType: 'object-first' }, ); }; @@ -1550,7 +1550,7 @@ const legacyScriptingRunner = (Zap, zcli, input) => { app.beforeRequest, request, zcli, - bundle + bundle, ); } diff --git a/packages/legacy-scripting-runner/middleware-factory.js b/packages/legacy-scripting-runner/middleware-factory.js index 88e42a792..617a4e16c 100644 --- a/packages/legacy-scripting-runner/middleware-factory.js +++ b/packages/legacy-scripting-runner/middleware-factory.js @@ -142,11 +142,11 @@ const createBeforeRequest = (app) => { if (!bundle._legacyBasicDigestAuthMiddlewareApplied) { const username = renderTemplate( authMapping.username || '', - bundle.authData + bundle.authData, ); const password = renderTemplate( authMapping.password || '', - bundle.authData + bundle.authData, ); bundle.authData.username = username; bundle.authData.password = password; @@ -169,7 +169,7 @@ const createBeforeRequest = (app) => { templateContext = Object.assign({}, bundle.authData, bundle.inputData); req.auth.oauth_consumer_key = renderTemplate( process.env.CLIENT_ID, - templateContext + templateContext, ); } if (!req.auth.oauth_consumer_secret) { @@ -177,12 +177,12 @@ const createBeforeRequest = (app) => { templateContext = Object.assign( {}, bundle.authData, - bundle.inputData + bundle.inputData, ); } req.auth.oauth_consumer_secret = renderTemplate( process.env.CLIENT_SECRET, - templateContext + templateContext, ); } diff --git a/packages/legacy-scripting-runner/test/bundle.js b/packages/legacy-scripting-runner/test/bundle.js index 044eb5685..a23652161 100644 --- a/packages/legacy-scripting-runner/test/bundle.js +++ b/packages/legacy-scripting-runner/test/bundle.js @@ -107,13 +107,13 @@ describe('bundleConverter', () => { key: 'trigger', }; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -176,13 +176,13 @@ describe('bundleConverter', () => { const event = _.cloneDeep(eventData); event.name = eventName; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -243,7 +243,7 @@ describe('bundleConverter', () => { const result = await bundleConverter(bundle, event); result.should.eql( expectedBundle, - `Expected bundle mismatch for "${event.name}".` + `Expected bundle mismatch for "${event.name}".`, ); }); @@ -299,7 +299,7 @@ describe('bundleConverter', () => { const result = await bundleConverter(bundle, event); result.should.eql( expectedBundle, - `Expected bundle mismatch for "${event.name}".` + `Expected bundle mismatch for "${event.name}".`, ); }); @@ -364,7 +364,7 @@ describe('bundleConverter', () => { const result = await bundleConverter(bundle, event); result.should.eql( expectedBundle, - `Expected bundle mismatch for "${event.name}".` + `Expected bundle mismatch for "${event.name}".`, ); }); @@ -426,7 +426,7 @@ describe('bundleConverter', () => { const result = await bundleConverter(bundle, event); result.should.eql( expectedBundle, - `Expected bundle mismatch for "${event.name}".` + `Expected bundle mismatch for "${event.name}".`, ); }); @@ -477,7 +477,7 @@ describe('bundleConverter', () => { const result = await bundleConverter(bundle, event); result.should.eql( expectedBundle, - `Expected bundle mismatch for "${event.name}".` + `Expected bundle mismatch for "${event.name}".`, ); }); @@ -536,7 +536,7 @@ describe('bundleConverter', () => { const result = await bundleConverter(bundle, event); result.should.eql( expectedBundle, - `Expected bundle mismatch for "${event.name}".` + `Expected bundle mismatch for "${event.name}".`, ); }); @@ -601,13 +601,13 @@ describe('bundleConverter', () => { key: 'create', }; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -673,13 +673,13 @@ describe('bundleConverter', () => { const event = _.cloneDeep(eventData); event.name = eventName; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -739,13 +739,13 @@ describe('bundleConverter', () => { key: 'search', }; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -805,13 +805,13 @@ describe('bundleConverter', () => { const event = _.cloneDeep(eventData); event.name = eventName; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -877,13 +877,13 @@ describe('bundleConverter', () => { const event = _.cloneDeep(eventData); event.name = eventName; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -958,13 +958,13 @@ describe('bundleConverter', () => { const event = _.cloneDeep(eventData); event.name = eventName; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -1109,13 +1109,13 @@ describe('bundleConverter', () => { const event = _.cloneDeep(eventData); event.name = eventName; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -1161,13 +1161,13 @@ describe('bundleConverter', () => { name: eventName, }; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); @@ -1214,13 +1214,13 @@ describe('bundleConverter', () => { name: eventName, }; return bundleConverter(bundle, event); - }) + }), ); _.zip(events, results).forEach(([eventName, result]) => { result.should.eql( expectedBundle, - `Expected bundle mismatch for "${eventName}".` + `Expected bundle mismatch for "${eventName}".`, ); }); }); diff --git a/packages/legacy-scripting-runner/test/integration-test.js b/packages/legacy-scripting-runner/test/integration-test.js index 791d51ce2..7a12dcbea 100644 --- a/packages/legacy-scripting-runner/test/integration-test.js +++ b/packages/legacy-scripting-runner/test/integration-test.js @@ -77,7 +77,7 @@ describe('Integration Test', function () { it('get_session_info', () => { const input = createTestInput( compiledApp, - 'authentication.sessionConfig.perform' + 'authentication.sessionConfig.perform', ); input.bundle.authData = { username: 'user', @@ -98,7 +98,7 @@ describe('Integration Test', function () { it('get_connection_label', () => { const input = createTestInput( compiledApp, - 'authentication.connectionLabel' + 'authentication.connectionLabel', ); input.bundle.inputData = { name: 'Mark', @@ -162,7 +162,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'authentication.oauth2Config.authorizeUrl' + 'authentication.oauth2Config.authorizeUrl', ); input.bundle.inputData = { my_client_id: '1234', @@ -174,7 +174,7 @@ describe('Integration Test', function () { output.results, `${AUTH_JSON_SERVER_URL}/oauth/authorize?` + 'client_id=1234&redirect_uri=https%3A%2F%2Fexample.com&' + - 'response_type=code&state=qwerty' + 'response_type=code&state=qwerty', ); }); }); @@ -188,7 +188,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'authentication.oauth2Config.authorizeUrl' + 'authentication.oauth2Config.authorizeUrl', ); input.bundle.inputData = { redirect_uri: 'https://example.com/new', @@ -200,7 +200,7 @@ describe('Integration Test', function () { `${AUTH_JSON_SERVER_URL}/oauth/authorize?` + 'client_id=1234&' + 'redirect_uri=https%3A%2F%2Fexample.com%2Fnew&' + - 'response_type=code&state=qwerty' + 'response_type=code&state=qwerty', ); }); }); @@ -214,7 +214,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'authentication.oauth2Config.authorizeUrl' + 'authentication.oauth2Config.authorizeUrl', ); // inputData should take precedence over authData for authorizeUrl. This @@ -234,7 +234,7 @@ describe('Integration Test', function () { 'https://from.input.data/authorize?' + 'client_id=1234&' + 'redirect_uri=https%3A%2F%2Fexample.com&' + - 'response_type=code&state=qwerty' + 'response_type=code&state=qwerty', ); }); }); @@ -248,7 +248,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'authentication.oauth2Config.getAccessToken' + 'authentication.oauth2Config.getAccessToken', ); // inputData should take precedence over authData for getAccessToken. This // is because on CLI authData always holds the *saved* auth fields, and @@ -273,14 +273,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_token_basic', - 'pre_oauthv2_token' + 'pre_oauthv2_token', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.getAccessToken' + 'authentication.oauth2Config.getAccessToken', ); input.bundle.inputData = { redirect_uri: 'https://example.com', @@ -298,7 +298,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'post_oauthv2_token_basic', - 'post_oauthv2_token' + 'post_oauthv2_token', ); appDefWithAuth.legacy.authentication.oauth2Config.accessTokenUrl += 'token'; @@ -307,7 +307,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'authentication.oauth2Config.getAccessToken' + 'authentication.oauth2Config.getAccessToken', ); input.bundle.inputData = { redirect_uri: 'https://example.com', @@ -325,19 +325,19 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_token_basic', - 'pre_oauthv2_token' + 'pre_oauthv2_token', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'post_oauthv2_token_basic', - 'post_oauthv2_token' + 'post_oauthv2_token', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.getAccessToken' + 'authentication.oauth2Config.getAccessToken', ); input.bundle.inputData = { redirect_uri: 'https://example.com', @@ -355,14 +355,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_token_payload_only_in_params', - 'pre_oauthv2_token' + 'pre_oauthv2_token', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.getAccessToken' + 'authentication.oauth2Config.getAccessToken', ); input.bundle.inputData = { redirect_uri: 'https://example.com', @@ -378,14 +378,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_token_yet_to_save_auth_fields', - 'pre_oauthv2_token' + 'pre_oauthv2_token', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.getAccessToken' + 'authentication.oauth2Config.getAccessToken', ); // inputData should take precedence over authData input.bundle.authData = { @@ -409,14 +409,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_refresh_auth_json_server', - 'pre_oauthv2_refresh' + 'pre_oauthv2_refresh', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.refreshAccessToken' + 'authentication.oauth2Config.refreshAccessToken', ); input.bundle.authData = { refresh_token: 'a_refresh_token', @@ -431,14 +431,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_refresh_httpbin_form', - 'pre_oauthv2_refresh' + 'pre_oauthv2_refresh', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.refreshAccessToken' + 'authentication.oauth2Config.refreshAccessToken', ); input.bundle.authData = { refresh_token: 'my_refresh_token', @@ -456,14 +456,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_refresh_httpbin_json', - 'pre_oauthv2_refresh' + 'pre_oauthv2_refresh', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.refreshAccessToken' + 'authentication.oauth2Config.refreshAccessToken', ); input.bundle.authData = { refresh_token: 'my_refresh_token', @@ -481,13 +481,13 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_refresh_request_data', - 'pre_oauthv2_refresh' + 'pre_oauthv2_refresh', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.refreshAccessToken' + 'authentication.oauth2Config.refreshAccessToken', ); input.bundle.authData = { refresh_token: 'my_refresh_token', @@ -516,13 +516,13 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_refresh_does_not_retry', - 'pre_oauthv2_refresh' + 'pre_oauthv2_refresh', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.refreshAccessToken' + 'authentication.oauth2Config.refreshAccessToken', ); input.bundle.authData = { refresh_token: 'my_refresh_token', @@ -551,13 +551,13 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'pre_oauthv2_refresh_bundle_load', - 'pre_oauthv2_refresh' + 'pre_oauthv2_refresh', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'authentication.oauth2Config.refreshAccessToken' + 'authentication.oauth2Config.refreshAccessToken', ); input.bundle.authData = { refresh_token: 'my_refresh_token', @@ -584,7 +584,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'post_oauthv2_token_returns_nothing', - 'post_oauthv2_token' + 'post_oauthv2_token', ); appDefWithAuth.legacy.authentication.oauth2Config.accessTokenUrl += 'token'; @@ -593,7 +593,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'authentication.oauth2Config.getAccessToken' + 'authentication.oauth2Config.getAccessToken', ); input.bundle.inputData = { redirect_uri: 'https://example.com', @@ -613,7 +613,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.test.operation.perform' + 'triggers.test.operation.perform', ); input.bundle.authData = { access_token: 'stale_token' }; return app(input).should.be.rejectedWith({ name: 'RefreshAuthError' }); @@ -629,7 +629,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'recipe_post_poll' + 'recipe_post_poll', ); appDef.legacy.triggers.recipe.operation.url = `${HTTPBIN_URL}/get?name={{name}}&active={{active}}`; const _compiledApp = schemaTools.prepareApp(appDef); @@ -637,7 +637,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.recipe.operation.perform' + 'triggers.recipe.operation.perform', ); input.bundle.authData = { name: 'john' }; input.bundle.inputData = { name: 'johnny', active: false }; @@ -661,7 +661,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { should.deepEqual(output.results, []); @@ -682,7 +682,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { should.deepEqual(output.results, []); @@ -693,7 +693,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, sessionAuthConfig); _appDefWithAuth.legacy.authentication.mapping = {}; @@ -705,7 +705,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'hello', @@ -721,7 +721,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); _appDefWithAuth.legacy.authentication.mapping = { @@ -735,7 +735,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret', @@ -749,7 +749,7 @@ describe('Integration Test', function () { it('KEY_poll', () => { const input = createTestInput( compiledApp, - 'triggers.contact_full.operation.perform' + 'triggers.contact_full.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.meta = { @@ -804,7 +804,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_underscore', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -812,7 +812,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -827,7 +827,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_header_case', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -835,7 +835,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -848,26 +848,26 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_poll_default_headers', - 'movie_poll' + 'movie_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; should.equal(echoed.headers.Accept[0], 'application/json'); should.equal( echoed.headers['Content-Type'][0], - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); should.equal(echoed.args.accept[0], 'application/json'); should.equal( echoed.args.contentType[0], - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); }); }); @@ -876,14 +876,14 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_poll_stop_request', - 'movie_poll' + 'movie_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { should.deepEqual(output.results, []); @@ -894,14 +894,14 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_poll_z_request_uri', - 'movie_poll' + 'movie_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -917,7 +917,7 @@ describe('Integration Test', function () { it('KEY_pre_poll', () => { const input = createTestInput( compiledApp, - 'triggers.contact_pre.operation.perform' + 'triggers.contact_pre.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -932,30 +932,30 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_default_headers', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; should.equal(echoed.headers.Accept[0], 'application/json'); should.equal( echoed.headers['Content-Type'][0], - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); should.equal(echoed.args.accept[0], 'application/json'); should.equal( echoed.args.contentType[0], - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); }); }); @@ -964,18 +964,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_dynamic_dropdown', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.meta = { isFillingDynamicDropdown: true, @@ -1008,18 +1008,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_null_request_data', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -1031,18 +1031,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_bundle_meta', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.meta = { isLoadingSample: true, @@ -1074,18 +1074,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_invalid_chars_in_headers', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -1097,18 +1097,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_number_header', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -1120,18 +1120,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_urlencode', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -1143,7 +1143,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_this_binding', - 'movie_pre_poll' + 'movie_pre_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1151,7 +1151,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1165,14 +1165,14 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_error', - 'movie_pre_poll' + 'movie_pre_poll', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return app(input).should.be.rejectedWith(/of undefined/); }); @@ -1181,7 +1181,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'recipe_pre_poll_underscore_template', - 'recipe_pre_poll' + 'recipe_pre_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1189,7 +1189,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.recipe.operation.perform' + 'triggers.recipe.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1203,7 +1203,7 @@ describe('Integration Test', function () { appDef.legacy.triggers.movie.operation.url = `${HTTPBIN_URL}/get?things={{things}}`; appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); // appDef will be injected to `input` as `input._zapier.app` by @@ -1220,7 +1220,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.inputData = { things: ['eyedrops', 'cyclops', 'ipod'], @@ -1231,7 +1231,7 @@ describe('Integration Test', function () { things: ['eyedrops,cyclops,ipod'], }); req.url.should.equal( - `${HTTPBIN_URL}/get?things=eyedrops%2Ccyclops%2Cipod` + `${HTTPBIN_URL}/get?things=eyedrops%2Ccyclops%2Cipod`, ); }); }); @@ -1240,11 +1240,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_GET_with_body', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1252,7 +1252,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -1264,11 +1264,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_GET_with_empty_body', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1276,7 +1276,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -1288,11 +1288,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_non_ascii_url', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1300,7 +1300,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const result = output.results[0]; @@ -1314,11 +1314,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_env_var', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1326,7 +1326,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input) @@ -1344,11 +1344,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_double_headers', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1356,7 +1356,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'one', @@ -1371,11 +1371,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_double_headers', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, sessionAuthConfig); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1383,7 +1383,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { key1: 'only', @@ -1399,11 +1399,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_stop_request', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, sessionAuthConfig); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1411,7 +1411,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { output.results.should.be.an.Array(); @@ -1423,11 +1423,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_merge_query_params', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_make_array', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, sessionAuthConfig); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1435,7 +1435,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const echoed = output.results[0]; @@ -1446,7 +1446,7 @@ describe('Integration Test', function () { it('KEY_post_poll, jQuery utils', () => { const input = createTestInput( compiledApp, - 'triggers.contact_post.operation.perform' + 'triggers.contact_post.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -1478,11 +1478,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_post_post_poll:', - 'contact_post_post_poll_disabled:' + 'contact_post_post_poll_disabled:', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_post_post_poll_jquery_dom', - 'contact_post_post_poll' + 'contact_post_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1490,7 +1490,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.contact_post.operation.perform' + 'triggers.contact_post.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1512,7 +1512,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_no_id', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1520,7 +1520,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1537,18 +1537,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_poll_request_options', - 'movie_pre_poll' + 'movie_pre_poll', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_request_options', - 'movie_post_poll' + 'movie_post_poll', ); const _compiledApp = schemaTools.prepareApp(appDef); const _app = createApp(appDef); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); return _app(input).then((output) => { const request = output.results[0]; @@ -1563,7 +1563,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_z_request_auth', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1571,7 +1571,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret', @@ -1585,7 +1585,7 @@ describe('Integration Test', function () { it('KEY_pre_poll & KEY_post_poll', () => { const input = createTestInput( compiledApp, - 'triggers.contact_pre_post.operation.perform' + 'triggers.contact_pre_post.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -1601,7 +1601,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_full_post_custom_trigger_fields', - 'contact_full_post_custom_trigger_fields_disabled' + 'contact_full_post_custom_trigger_fields_disabled', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1609,7 +1609,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.contact_full.operation.outputFields' + 'triggers.contact_full.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1628,7 +1628,7 @@ describe('Integration Test', function () { appDef.legacy.triggers.contact_full.operation.outputFieldsUrl += 's'; appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_full_pre_custom_trigger_fields', - 'contact_full_pre_custom_trigger_fields_disabled' + 'contact_full_pre_custom_trigger_fields_disabled', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1636,7 +1636,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.contact_full.operation.outputFields' + 'triggers.contact_full.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1654,7 +1654,7 @@ describe('Integration Test', function () { it('KEY_pre_custom_trigger_fields & KEY_post_custom_trigger_fields', () => { const input = createTestInput( compiledApp, - 'triggers.contact_full.operation.outputFields' + 'triggers.contact_full.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -1673,7 +1673,7 @@ describe('Integration Test', function () { // It's an auth test only if test_poll is true AND standard_poll is false const input = createTestInput( compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.meta = { @@ -1691,7 +1691,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_method_dehydration', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1699,7 +1699,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1722,7 +1722,7 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_poll_file_dehydration', - 'movie_post_poll' + 'movie_post_poll', ); const _appDefWithAuth = withAuth(appDef, apiKeyAuth); const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); @@ -1730,7 +1730,7 @@ describe('Integration Test', function () { const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return _app(input).then((output) => { @@ -1761,7 +1761,7 @@ describe('Integration Test', function () { const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; nock(AUTH_JSON_SERVER_URL) @@ -1801,7 +1801,7 @@ describe('Integration Test', function () { const _compiledApp = schemaTools.prepareApp(_appDefWithAuth); const input = createTestInput( _compiledApp, - 'triggers.movie.operation.perform' + 'triggers.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then(() => { @@ -1819,7 +1819,7 @@ describe('Integration Test', function () { const app = createApp(appDef); const input = createTestInput( compiledApp, - 'triggers.contact_hook_scriptingless.operation.perform' + 'triggers.contact_hook_scriptingless.operation.perform', ); input.bundle.cleanedRequest = { id: 9, @@ -1839,13 +1839,13 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_catch_hook_returning_object', - 'contact_hook_scripting_catch_hook' + 'contact_hook_scripting_catch_hook', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.cleanedRequest = { id: 10, @@ -1865,13 +1865,13 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_catch_hook_returning_array', - 'contact_hook_scripting_catch_hook' + 'contact_hook_scripting_catch_hook', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.cleanedRequest = [ { id: 11, name: 'Cate' }, @@ -1893,13 +1893,13 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_catch_hook_raw_request', - 'contact_hook_scripting_catch_hook' + 'contact_hook_scripting_catch_hook', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.rawRequest = { headers: { @@ -1922,13 +1922,13 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_catch_hook_stop_request', - 'contact_hook_scripting_catch_hook' + 'contact_hook_scripting_catch_hook', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); return app(input).then((output) => { should.deepEqual(output.results, []); @@ -1940,11 +1940,11 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_catch_hook_returning_object', - 'contact_hook_scripting_catch_hook' + 'contact_hook_scripting_catch_hook', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_pre_hook_disabled', - 'contact_hook_scripting_pre_hook' + 'contact_hook_scripting_pre_hook', ); const appDefWithAuth = withAuth(appDef, apiKeyAuth); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -1952,7 +1952,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.cleanedRequest = { @@ -1978,11 +1978,11 @@ describe('Integration Test', function () { 'notification'; appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_catch_hook_returning_object', - 'contact_hook_scripting_catch_hook' + 'contact_hook_scripting_catch_hook', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_pre_hook_disabled', - 'contact_hook_scripting_pre_hook' + 'contact_hook_scripting_pre_hook', ); const appDefWithAuth = withAuth(appDef, apiKeyAuth); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -1990,7 +1990,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.cleanedRequest = { @@ -2013,7 +2013,7 @@ describe('Integration Test', function () { 'notification'; appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_pre_hook_disabled', - 'contact_hook_scripting_pre_hook' + 'contact_hook_scripting_pre_hook', ); const appDefWithAuth = withAuth(appDef, apiKeyAuth); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2021,7 +2021,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.cleanedRequest = { @@ -2044,7 +2044,7 @@ describe('Integration Test', function () { 'notification'; appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_post_hook_returning_object', - 'contact_hook_scripting_post_hook' + 'contact_hook_scripting_post_hook', ); const appDefWithAuth = withAuth(appDef, apiKeyAuth); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2052,7 +2052,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.cleanedRequest = { @@ -2076,7 +2076,7 @@ describe('Integration Test', function () { 'notification'; appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_post_hook_returning_array', - 'contact_hook_scripting_post_hook' + 'contact_hook_scripting_post_hook', ); const appDefWithAuth = withAuth(appDef, apiKeyAuth); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2084,7 +2084,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.cleanedRequest = { @@ -2110,11 +2110,11 @@ describe('Integration Test', function () { 'notification'; appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_pre_hook_disabled', - 'contact_hook_scripting_pre_hook' + 'contact_hook_scripting_pre_hook', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'contact_hook_scripting_post_hook_returning_object', - 'contact_hook_scripting_post_hook' + 'contact_hook_scripting_post_hook', ); const appDefWithAuth = withAuth(appDef, apiKeyAuth); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2122,7 +2122,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.perform' + 'triggers.contact_hook_scripting.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.cleanedRequest = { @@ -2147,7 +2147,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.performSubscribe' + 'triggers.contact_hook_scripting.operation.performSubscribe', ); input.bundle.authData = { api_key: 'hey hey' }; input.bundle.inputData = { foo: 'bar' }; @@ -2158,7 +2158,7 @@ describe('Integration Test', function () { should.equal(output.results.json.event, 'contact.created'); should.equal( output.results.json.hidden_message, - 'pre_subscribe was here!' + 'pre_subscribe was here!', ); should.equal(output.results.headers['X-Api-Key'], 'hey hey'); should.equal(output.results.hiddenMessage, 'post_subscribe was here!'); @@ -2180,7 +2180,7 @@ describe('Integration Test', function () { should.deepEqual(output.results.json.bundleZap, { id: 9511 }); should.equal( output.results.json.bundleSubscriptionUrl, - 'https://foo.bar' + 'https://foo.bar', ); }); }); @@ -2192,7 +2192,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'triggers.contact_hook_scripting.operation.performUnsubscribe' + 'triggers.contact_hook_scripting.operation.performUnsubscribe', ); input.bundle.authData = { api_key: 'yo yo' }; input.bundle.inputData = { foo: 'bar', subscription_id: 8866 }; @@ -2235,7 +2235,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2272,7 +2272,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2298,7 +2298,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { key1: 'sec', key2: 'ret' }; return app(input).then((output) => { @@ -2315,7 +2315,7 @@ describe('Integration Test', function () { const legacyProps = appDefWithAuth.legacy.creates.movie.operation; legacyProps.url = legacyProps.url.replace( '/movie', - '/{{bundle.inputData.resource_name}}' + '/{{bundle.inputData.resource_name}}', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2323,7 +2323,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2351,7 +2351,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.inputData = { title: 'Men in Black', @@ -2367,7 +2367,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_disabled', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2375,7 +2375,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2395,7 +2395,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_unflatten', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2403,7 +2403,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2444,7 +2444,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_unflatten', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2452,7 +2452,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2480,26 +2480,26 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_write_default_headers', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { const echoed = output.results; should.equal(echoed.headers.Accept[0], 'application/json'); should.equal( echoed.headers['Content-Type'][0], - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); should.equal(echoed.json.accept, 'application/json'); should.equal( echoed.json.contentType, - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); }); }); @@ -2509,7 +2509,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'recipe_pre_write_underscore_template', - 'recipe_pre_write' + 'recipe_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2517,7 +2517,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.recipe.operation.perform' + 'creates.recipe.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2536,7 +2536,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_request_fallback', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2544,7 +2544,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2566,7 +2566,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_no_content', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2574,7 +2574,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { should.deepEqual(output.results, {}); @@ -2586,7 +2586,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_request_data_empty_string', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2594,7 +2594,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { const echoed = output.results; @@ -2607,7 +2607,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_prune_empty_params', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2615,7 +2615,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { const echoed = output.results; @@ -2633,7 +2633,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_data_is_object', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2641,18 +2641,18 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { const echoed = output.results; should.equal( echoed.headers['content-type'], - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); should.equal( echoed.textBody, 'foo=bar&apple=123&dragonfruit=%26%3D&eggplant=1.11&eggplant=2.22&' + - 'filbert=True&nest=foo&nest=hello' + 'filbert=True&nest=foo&nest=hello', ); }); }); @@ -2662,7 +2662,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_stop_request', - 'movie_pre_write' + 'movie_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2670,7 +2670,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { should.deepEqual(output.results, {}); @@ -2683,7 +2683,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_write_disabled', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2691,7 +2691,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2713,7 +2713,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_write_sloppy_mode', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2721,7 +2721,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2745,7 +2745,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_write_sloppy_mode', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2753,7 +2753,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2769,7 +2769,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_write_require', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2777,7 +2777,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -2793,7 +2793,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_write_returning_nothing', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2801,7 +2801,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2819,7 +2819,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_write_returning_string', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2827,7 +2827,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2843,21 +2843,21 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_write_intercept_error', - 'movie_pre_write' + 'movie_pre_write', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_write_intercept_error', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).should.be.rejectedWith( - /teapot here, go find a coffee machine/ + /teapot here, go find a coffee machine/, ); }); @@ -2865,18 +2865,18 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_pre_write_intercept_error', - 'movie_pre_write' + 'movie_pre_write', ); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_post_write_bad_code', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).should.be.rejectedWith(/I'm a teapot/); }); @@ -2886,12 +2886,12 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_write_disabled', - 'movie_pre_write' + 'movie_pre_write', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_write_disabled', - 'movie_post_write' + 'movie_post_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2899,7 +2899,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -2985,7 +2985,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_write_async', - 'movie_write' + 'movie_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -2993,7 +2993,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3048,7 +3048,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_write_sync', - 'movie_write' + 'movie_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3056,7 +3056,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3077,7 +3077,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_write_sync', - 'movie_write' + 'movie_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3085,7 +3085,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = []; @@ -3100,7 +3100,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_write_sync', - 'movie_write' + 'movie_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3108,7 +3108,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = [1234]; @@ -3123,12 +3123,12 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_write_sync', - 'movie_write' + 'movie_write', ); const legacyProps = appDefWithAuth.legacy.creates.movie.operation; legacyProps.url = legacyProps.url.replace( '/movie', - '/{{bundle.inputData.resource_name}}' + '/{{bundle.inputData.resource_name}}', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3136,7 +3136,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3157,26 +3157,26 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_write_default_headers', - 'movie_write' + 'movie_write', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { const echoed = output.results; should.equal(echoed.headers.Accept[0], 'application/json'); should.equal( echoed.headers['Content-Type'][0], - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); should.equal(echoed.json.accept, 'application/json'); should.equal( echoed.json.contentType, - 'application/json; charset=utf-8' + 'application/json; charset=utf-8', ); }); }); @@ -3185,14 +3185,14 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_write_json_true', - 'movie_write' + 'movie_write', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { const echoed = output.results; @@ -3204,14 +3204,14 @@ describe('Integration Test', function () { const appDef = _.cloneDeep(appDefinition); appDef.legacy.scriptingSource = appDef.legacy.scriptingSource.replace( 'movie_write_stop_request', - 'movie_write' + 'movie_write', ); const compiledApp = schemaTools.prepareApp(appDef); const app = createApp(appDef); const input = createTestInput( compiledApp, - 'creates.movie.operation.perform' + 'creates.movie.operation.perform', ); return app(input).then((output) => { should.deepEqual(output.results, {}); @@ -3227,7 +3227,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3244,7 +3244,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_action_fields_disabled', - 'movie_pre_custom_action_fields' + 'movie_pre_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3252,7 +3252,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3269,7 +3269,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_action_fields_empty_request_data', - 'movie_pre_custom_action_fields' + 'movie_pre_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3277,7 +3277,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3294,7 +3294,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'recipe_pre_custom_action_fields_underscore_template', - 'recipe_pre_custom_action_fields' + 'recipe_pre_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3302,7 +3302,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.recipe.operation.inputFields' + 'creates.recipe.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3323,7 +3323,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_action_fields_disabled', - 'movie_post_custom_action_fields' + 'movie_post_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3331,7 +3331,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3351,7 +3351,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_action_fields_dict_field', - 'movie_post_custom_action_fields' + 'movie_post_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3359,7 +3359,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3378,7 +3378,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_action_fields_returning_nothing', - 'movie_post_custom_action_fields' + 'movie_post_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3386,7 +3386,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3402,12 +3402,12 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_action_fields_disabled', - 'movie_pre_custom_action_fields' + 'movie_pre_custom_action_fields', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_action_fields_disabled', - 'movie_post_custom_action_fields' + 'movie_post_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3415,7 +3415,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3434,7 +3434,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_custom_action_fields_disabled', - 'movie_custom_action_fields' + 'movie_custom_action_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3442,7 +3442,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.inputFields' + 'creates.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3465,7 +3465,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.outputFields' + 'creates.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3485,7 +3485,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_action_result_fields_disabled', - 'movie_pre_custom_action_result_fields' + 'movie_pre_custom_action_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3493,7 +3493,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.outputFields' + 'creates.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3514,7 +3514,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_action_result_fields_disabled', - 'movie_post_custom_action_result_fields' + 'movie_post_custom_action_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3522,7 +3522,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.outputFields' + 'creates.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3544,12 +3544,12 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_action_result_fields_disabled', - 'movie_pre_custom_action_result_fields' + 'movie_pre_custom_action_result_fields', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_action_result_fields_disabled', - 'movie_post_custom_action_result_fields' + 'movie_post_custom_action_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3557,7 +3557,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.outputFields' + 'creates.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3579,7 +3579,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_custom_action_result_fields_disabled', - 'movie_custom_action_result_fields' + 'movie_custom_action_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -3587,7 +3587,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.movie.operation.outputFields' + 'creates.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -3611,7 +3611,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3639,7 +3639,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3662,14 +3662,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_tweak_filename', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3692,14 +3692,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_replace_hydrate_url', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3722,14 +3722,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_replace_with_string_content', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3752,14 +3752,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_fully_replace_url', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3782,14 +3782,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_fully_replace_content', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3812,14 +3812,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_content_dispoistion_with_quotes', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3842,14 +3842,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_content_dispoistion_no_quotes', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3872,14 +3872,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_content_dispoistion_non_ascii', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3902,14 +3902,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_wrong_content_type', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3930,14 +3930,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file2_pre_write_rename_file_field', - 'file2_pre_write' + 'file2_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file2.operation.perform' + 'creates.file2.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3960,14 +3960,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_optional_file_field', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -3985,14 +3985,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_optional_file_field', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4014,14 +4014,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'file_pre_write_cancel_multipart', - 'file_pre_write' + 'file_pre_write', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'creates.file.operation.perform' + 'creates.file.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4054,7 +4054,7 @@ describe('Integration Test', function () { it('should get data if auth is correct', () => { const input = createTestInput( compiledApp, - 'hydrators.legacyMethodHydrator' + 'hydrators.legacyMethodHydrator', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4073,7 +4073,7 @@ describe('Integration Test', function () { it('should fail if bad auth', () => { const input = createTestInput( compiledApp, - 'hydrators.legacyMethodHydrator' + 'hydrators.legacyMethodHydrator', ); input.bundle.authData = { api_key: 'bad key' }; input.bundle.inputData = { @@ -4088,7 +4088,7 @@ describe('Integration Test', function () { it('should fail if no auth', () => { const input = createTestInput( compiledApp, - 'hydrators.legacyMethodHydrator' + 'hydrators.legacyMethodHydrator', ); input.bundle.inputData = { method: 'getUser', @@ -4107,7 +4107,7 @@ describe('Integration Test', function () { filePromise, knownLength, filename, - contentType + contentType, ) => { // Assuming filePromise gives us a JSON string const response = await filePromise; @@ -4133,7 +4133,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'hydrators.legacyFileHydrator' + 'hydrators.legacyFileHydrator', ); input.bundle.authData = { api_key: 'super secret' }; input.bundle.inputData = { @@ -4152,7 +4152,7 @@ describe('Integration Test', function () { response.getHeader.should.be.Function(); should.equal( response.getHeader('content-type'), - 'application/json; encoding=utf-8' + 'application/json; encoding=utf-8', ); }); }); @@ -4166,7 +4166,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'hydrators.legacyFileHydrator' + 'hydrators.legacyFileHydrator', ); input.bundle.authData = { api_key: 'super secret' }; input.bundle.inputData = { @@ -4188,7 +4188,7 @@ describe('Integration Test', function () { response.getHeader.should.be.Function(); should.equal( response.getHeader('content-type'), - 'application/json; encoding=utf-8' + 'application/json; encoding=utf-8', ); }); }); @@ -4202,7 +4202,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'hydrators.legacyFileHydrator' + 'hydrators.legacyFileHydrator', ); input.bundle.authData = { api_key: 'super secret' }; input.bundle.inputData = { @@ -4227,7 +4227,7 @@ describe('Integration Test', function () { response.getHeader.should.be.Function(); should.equal( response.getHeader('content-type'), - 'application/json; encoding=utf-8' + 'application/json; encoding=utf-8', ); }); }); @@ -4241,7 +4241,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'hydrators.legacyFileHydrator' + 'hydrators.legacyFileHydrator', ); input.bundle.authData = { api_key: 'super secret' }; input.bundle.inputData = { @@ -4270,7 +4270,7 @@ describe('Integration Test', function () { response.getHeader.should.be.Function(); should.equal( response.getHeader('content-type'), - 'application/json; encoding=utf-8' + 'application/json; encoding=utf-8', ); }); }); @@ -4287,7 +4287,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.perform' + 'searches.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4307,14 +4307,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_search_disabled', - 'movie_pre_search' + 'movie_pre_search', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'searches.movie.operation.perform' + 'searches.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4334,14 +4334,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_search_stop_request', - 'movie_pre_search' + 'movie_pre_search', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'searches.movie.operation.perform' + 'searches.movie.operation.perform', ); return app(input).then((output) => { should.deepEqual(output.results, []); @@ -4355,14 +4355,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_search_disabled', - 'movie_post_search' + 'movie_post_search', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'searches.movie.operation.perform' + 'searches.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4382,19 +4382,19 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_search_disabled', - 'movie_pre_search' + 'movie_pre_search', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_search_disabled', - 'movie_post_search' + 'movie_post_search', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'searches.movie.operation.perform' + 'searches.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4414,14 +4414,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_search_disabled', - 'movie_search' + 'movie_search', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'searches.movie.operation.perform' + 'searches.movie.operation.perform', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4441,14 +4441,14 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_search_stop_request', - 'movie_search' + 'movie_search', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); const app = createApp(appDefWithAuth); const input = createTestInput( compiledApp, - 'searches.movie.operation.perform' + 'searches.movie.operation.perform', ); return app(input).then((output) => { should.deepEqual(output.results, []); @@ -4460,7 +4460,7 @@ describe('Integration Test', function () { const legacyProps = appDefWithAuth.legacy.searches.movie.operation; legacyProps.resourceUrl = legacyProps.resourceUrl.replace( '/movie/', - '/movies/' + '/movies/', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4468,7 +4468,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.performGet' + 'searches.movie.operation.performGet', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { @@ -4486,7 +4486,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_read_resource_disabled', - 'movie_pre_read_resource' + 'movie_pre_read_resource', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4494,7 +4494,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.performGet' + 'searches.movie.operation.performGet', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { id: 5 }; @@ -4510,12 +4510,12 @@ describe('Integration Test', function () { const legacyProps = appDefWithAuth.legacy.searches.movie.operation; legacyProps.resourceUrl = legacyProps.resourceUrl.replace( '/movie/', - '/movies/' + '/movies/', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_read_resource_disabled', - 'movie_post_read_resource' + 'movie_post_read_resource', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4523,7 +4523,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.performGet' + 'searches.movie.operation.performGet', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { id: 6 }; @@ -4532,7 +4532,7 @@ describe('Integration Test', function () { should.equal(movie.id, 6); should.equal( movie.title, - 'title 6 (movie_post_read_resource was here)' + 'title 6 (movie_post_read_resource was here)', ); should.equal(movie.anotherId, 6); }); @@ -4543,12 +4543,12 @@ describe('Integration Test', function () { const legacyProps = appDefWithAuth.legacy.searches.movie.operation; legacyProps.resourceUrl = legacyProps.resourceUrl.replace( '/movie/', - '/movies/' + '/movies/', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_read_resource_array', - 'movie_post_read_resource' + 'movie_post_read_resource', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4556,7 +4556,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.performGet' + 'searches.movie.operation.performGet', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { id: 6 }; @@ -4572,12 +4572,12 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_read_resource_disabled', - 'movie_pre_read_resource' + 'movie_pre_read_resource', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_read_resource_disabled', - 'movie_post_read_resource' + 'movie_post_read_resource', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4585,7 +4585,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.performGet' + 'searches.movie.operation.performGet', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { id: 7 }; @@ -4594,7 +4594,7 @@ describe('Integration Test', function () { should.equal(movie.id, 7); should.equal( movie.title, - 'title 7 (movie_post_read_resource was here)' + 'title 7 (movie_post_read_resource was here)', ); should.equal(movie.anotherId, 7); }); @@ -4605,7 +4605,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_read_resource_disabled', - 'movie_read_resource' + 'movie_read_resource', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4613,7 +4613,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.performGet' + 'searches.movie.operation.performGet', ); input.bundle.authData = { api_key: 'secret' }; input.bundle.inputData = { id: 8 }; @@ -4633,7 +4633,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.inputFields' + 'searches.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4649,7 +4649,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_search_fields_disabled', - 'movie_pre_custom_search_fields' + 'movie_pre_custom_search_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4657,7 +4657,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.inputFields' + 'searches.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4674,7 +4674,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_search_fields_disabled', - 'movie_post_custom_search_fields' + 'movie_post_custom_search_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4682,7 +4682,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.inputFields' + 'searches.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4700,12 +4700,12 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_search_fields_disabled', - 'movie_pre_custom_search_fields' + 'movie_pre_custom_search_fields', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_search_fields_disabled', - 'movie_post_custom_search_fields' + 'movie_post_custom_search_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4713,7 +4713,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.inputFields' + 'searches.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4731,7 +4731,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_custom_search_fields_disabled', - 'movie_custom_search_fields' + 'movie_custom_search_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4739,7 +4739,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.inputFields' + 'searches.movie.operation.inputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4761,7 +4761,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.outputFields' + 'searches.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4781,7 +4781,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_search_result_fields_disabled', - 'movie_pre_custom_search_result_fields' + 'movie_pre_custom_search_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4789,7 +4789,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.outputFields' + 'searches.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4810,7 +4810,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_search_result_fields_disabled', - 'movie_post_custom_search_result_fields' + 'movie_post_custom_search_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4818,7 +4818,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.outputFields' + 'searches.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4840,12 +4840,12 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_pre_custom_search_result_fields_disabled', - 'movie_pre_custom_search_result_fields' + 'movie_pre_custom_search_result_fields', ); appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_post_custom_search_result_fields_disabled', - 'movie_post_custom_search_result_fields' + 'movie_post_custom_search_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4853,7 +4853,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.outputFields' + 'searches.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { @@ -4875,7 +4875,7 @@ describe('Integration Test', function () { appDefWithAuth.legacy.scriptingSource = appDefWithAuth.legacy.scriptingSource.replace( 'movie_custom_search_result_fields_disabled', - 'movie_custom_search_result_fields' + 'movie_custom_search_result_fields', ); const compiledApp = schemaTools.prepareApp(appDefWithAuth); @@ -4883,7 +4883,7 @@ describe('Integration Test', function () { const input = createTestInput( compiledApp, - 'searches.movie.operation.outputFields' + 'searches.movie.operation.outputFields', ); input.bundle.authData = { api_key: 'secret' }; return app(input).then((output) => { diff --git a/packages/legacy-scripting-runner/test/zfactory.js b/packages/legacy-scripting-runner/test/zfactory.js index b472d3bf7..1a3dd1996 100644 --- a/packages/legacy-scripting-runner/test/zfactory.js +++ b/packages/legacy-scripting-runner/test/zfactory.js @@ -7,7 +7,7 @@ describe('z', () => { it('z.hash', (done) => { const result = z.hash('sha256', 'my awesome string'); result.should.equal( - '97f13a1635524dd41daca6601e5d9fe07e10e62790851e527b039851b1f8b9a1' + '97f13a1635524dd41daca6601e5d9fe07e10e62790851e527b039851b1f8b9a1', ); done(); }); @@ -93,7 +93,7 @@ describe('z', () => { } catch (e) { e.name.should.eql('Error'); e.message.should.eql( - `Error parsing response. We got: "${invalidJsonString}"` + `Error parsing response. We got: "${invalidJsonString}"`, ); done(); } diff --git a/packages/legacy-scripting-runner/zfactory.js b/packages/legacy-scripting-runner/zfactory.js index f57df8fd1..3c47a051e 100644 --- a/packages/legacy-scripting-runner/zfactory.js +++ b/packages/legacy-scripting-runner/zfactory.js @@ -123,7 +123,7 @@ const zfactory = (zcli, app, logger) => { if (_.isFunction(callback)) { return request(options, (err, response) => - callback(err, convertResponse(response)) + callback(err, convertResponse(response)), ); } @@ -145,7 +145,7 @@ const zfactory = (zcli, app, logger) => { algorithm, string, encoding = 'hex', - inputEncoding = 'binary' + inputEncoding = 'binary', ) => { const hasher = crypto.createHash(algorithm); hasher.update(string, inputEncoding); diff --git a/packages/schema/bin/export.js b/packages/schema/bin/export.js index 193df10f7..ecedc9433 100644 --- a/packages/schema/bin/export.js +++ b/packages/schema/bin/export.js @@ -7,5 +7,5 @@ const exportedSchema = schema.exportSchema(); fs.writeFileSync( './exported-schema.json', - JSON.stringify(exportedSchema, null, ' ') + JSON.stringify(exportedSchema, null, ' '), ); diff --git a/packages/schema/lib/functional-constraints/bufferedCreateConstraints.js b/packages/schema/lib/functional-constraints/bufferedCreateConstraints.js index 158599153..c493a7f2b 100644 --- a/packages/schema/lib/functional-constraints/bufferedCreateConstraints.js +++ b/packages/schema/lib/functional-constraints/bufferedCreateConstraints.js @@ -18,8 +18,8 @@ const bufferedCreateConstraints = (definition) => { '/BasicCreateActionOperationSchema', `instance.${actionType}.${actionDef.key}.operation`, 'missing', - 'performBuffer' - ) + 'performBuffer', + ), ); } @@ -31,8 +31,8 @@ const bufferedCreateConstraints = (definition) => { '/BasicCreateActionOperationSchema', `instance.${actionType}.${actionDef.key}.operation`, 'invalid', - 'perform' - ) + 'perform', + ), ); } @@ -41,7 +41,7 @@ const bufferedCreateConstraints = (definition) => { const inputFields = _.get( actionDef, ['operation', 'inputFields'], - [] + [], ); inputFields.forEach((inputField) => { if (inputField.required) { @@ -58,8 +58,8 @@ const bufferedCreateConstraints = (definition) => { '/BufferConfigSchema', `instance.${actionType}.${actionDef.key}.operation.buffer.groupedBy[${index}]`, 'invalid', - 'groupedBy' - ) + 'groupedBy', + ), ); } }); @@ -75,8 +75,8 @@ const bufferedCreateConstraints = (definition) => { '/BasicCreateActionOperationSchema', `instance.${actionType}.${actionDef.key}.operation`, 'missing', - 'buffer' - ) + 'buffer', + ), ); } @@ -88,8 +88,8 @@ const bufferedCreateConstraints = (definition) => { '/BasicCreateActionOperationSchema', `instance.${actionType}.${actionDef.key}.operation`, 'invalid', - 'perform' - ) + 'perform', + ), ); } } diff --git a/packages/schema/lib/functional-constraints/deepNestedFields.js b/packages/schema/lib/functional-constraints/deepNestedFields.js index 746dbcb53..9badf22a2 100644 --- a/packages/schema/lib/functional-constraints/deepNestedFields.js +++ b/packages/schema/lib/functional-constraints/deepNestedFields.js @@ -16,13 +16,13 @@ const collectErrors = (inputFields, path) => { '/FieldSchema', `instance.${path}.inputFields[${index}].children`, 'empty', - 'inputFields' - ) + 'inputFields', + ), ); } else { const hasDeeplyNestedChildren = _.some( inputField.children, - (child) => child.children + (child) => child.children, ); if (hasDeeplyNestedChildren) { @@ -33,8 +33,8 @@ const collectErrors = (inputFields, path) => { '/FieldSchema', `instance.${path}.inputFields[${index}]`, 'deepNesting', - 'inputFields' - ) + 'inputFields', + ), ); } } @@ -54,8 +54,8 @@ const validateFieldNesting = (definition) => { errors = errors.concat( collectErrors( actionDef.operation.inputFields, - `${typeOf}.${actionDef.key}` - ) + `${typeOf}.${actionDef.key}`, + ), ); } }); diff --git a/packages/schema/lib/functional-constraints/labelWhenVisible.js b/packages/schema/lib/functional-constraints/labelWhenVisible.js index a847060b2..4dc93215d 100644 --- a/packages/schema/lib/functional-constraints/labelWhenVisible.js +++ b/packages/schema/lib/functional-constraints/labelWhenVisible.js @@ -18,8 +18,8 @@ const labelWhenVisible = (definition) => { `/BasicDisplaySchema`, `instance.${actionType}.${key}.display`, 'invalid', - 'key' - ) + 'key', + ), ); } }); diff --git a/packages/schema/lib/functional-constraints/matchingKeys.js b/packages/schema/lib/functional-constraints/matchingKeys.js index 7a87e897b..29b7b6934 100644 --- a/packages/schema/lib/functional-constraints/matchingKeys.js +++ b/packages/schema/lib/functional-constraints/matchingKeys.js @@ -22,8 +22,8 @@ const matchingKeys = (definition) => { `/${_.capitalize(actionType)}Schema`, `instance.${key}.key`, 'invalid', - 'key' - ) + 'key', + ), ); } }); diff --git a/packages/schema/lib/functional-constraints/mutuallyExclusiveFields.js b/packages/schema/lib/functional-constraints/mutuallyExclusiveFields.js index ff612b1b4..b988fa330 100644 --- a/packages/schema/lib/functional-constraints/mutuallyExclusiveFields.js +++ b/packages/schema/lib/functional-constraints/mutuallyExclusiveFields.js @@ -35,8 +35,8 @@ const verifyIncompatibilities = (inputFields, path) => { '/FieldSchema', `instance.${path}.inputFields[${index}]`, 'invalid', - 'inputFields' - ) + 'inputFields', + ), ); } }); @@ -56,7 +56,7 @@ const mutuallyExclusiveFields = (definition) => { ...errors, ...verifyIncompatibilities( actionDef.operation.inputFields, - `${typeOf}.${actionDef.key}` + `${typeOf}.${actionDef.key}`, ), ]; } diff --git a/packages/schema/lib/functional-constraints/pollingThrottle.js b/packages/schema/lib/functional-constraints/pollingThrottle.js index dec182e6c..644f24a4f 100644 --- a/packages/schema/lib/functional-constraints/pollingThrottle.js +++ b/packages/schema/lib/functional-constraints/pollingThrottle.js @@ -22,8 +22,8 @@ const pollingThrottle = (definition) => { '/ThrottleObjectSchema', `instance.${actionType}.${actionDef.key}.operation.throttle`, 'invalid', - 'throttle' - ) + 'throttle', + ), ); } }); diff --git a/packages/schema/lib/functional-constraints/requirePerformConditionally.js b/packages/schema/lib/functional-constraints/requirePerformConditionally.js index de53594fc..93132bd9a 100644 --- a/packages/schema/lib/functional-constraints/requirePerformConditionally.js +++ b/packages/schema/lib/functional-constraints/requirePerformConditionally.js @@ -22,8 +22,8 @@ const requirePerformConditionally = (definition) => { '/BasicCreateActionOperationSchema', `instance.${actionType}.${actionDef.key}.operation`, 'required', - 'perform' - ) + 'perform', + ), ); } }); diff --git a/packages/schema/lib/functional-constraints/requiredSamples.js b/packages/schema/lib/functional-constraints/requiredSamples.js index 5adb79af7..57d330c89 100644 --- a/packages/schema/lib/functional-constraints/requiredSamples.js +++ b/packages/schema/lib/functional-constraints/requiredSamples.js @@ -18,7 +18,7 @@ const check = (definition) => { : new jsonschema.ValidationError( 'requires "sample", because it\'s not hidden', definition, - definition.id + definition.id, ); }; @@ -27,7 +27,7 @@ module.exports = (definition, mainSchema) => { if (mainSchema.id === RESOURCE_ID) { definitions = RESOURCE_METHODS.map((method) => definition[method]).filter( - Boolean + Boolean, ); // allow method definitions to inherit the sample @@ -44,7 +44,7 @@ module.exports = (definition, mainSchema) => { new jsonschema.ValidationError( 'expected at least one resource operation', definition, - definition.id + definition.id, ), ]; } diff --git a/packages/schema/lib/functional-constraints/searchOrCreateKeys.js b/packages/schema/lib/functional-constraints/searchOrCreateKeys.js index 68cc86c37..bdf8ea8b8 100644 --- a/packages/schema/lib/functional-constraints/searchOrCreateKeys.js +++ b/packages/schema/lib/functional-constraints/searchOrCreateKeys.js @@ -15,7 +15,7 @@ const getSearchOutputSampleKeys = (definition, searchKey) => { const searchOutputSampleFields = _.get( definition.searches, `${searchKey}.operation.sample`, - {} + {}, ); return Object.keys(searchOutputSampleFields); @@ -41,19 +41,19 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { const updateInputKeys = getFieldKeys( definition.creates, - `${updateKey}.operation.inputFields` + `${updateKey}.operation.inputFields`, ); const searchInputKeys = getFieldKeys( definition.searches, - `${searchKey}.operation.inputFields` + `${searchKey}.operation.inputFields`, ); const searchOutputKeys = getFieldKeys( definition.searches, - `${searchKey}.operation.outputFields` + `${searchKey}.operation.outputFields`, ); const searchOutputSampleKeys = getSearchOutputSampleKeys( definition, - searchKey + searchKey, ); // There are constraints where we check for keys in either outputFields or sample, so combining them is a shortcut @@ -65,11 +65,11 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { // For some constraints, there is a difference between not "having" a key defined versus having one but with empty values const hasSearchOutputFields = _.has( definition.searches, - `${searchKey}.operation.outputFields` + `${searchKey}.operation.outputFields`, ); const hasSearchOutputSample = _.has( definition.searches, - `${searchKey}.operation.sample` + `${searchKey}.operation.sample`, ); // Confirm searchOrCreate.key matches a searches.key (current Zapier editor limitation) @@ -81,8 +81,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.key`, 'invalidKey', - 'key' - ) + 'key', + ), ); } @@ -95,8 +95,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.search`, 'invalidKey', - 'search' - ) + 'search', + ), ); } @@ -109,8 +109,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.create`, 'invalidKey', - 'create' - ) + 'create', + ), ); } @@ -122,8 +122,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { searchOrCreateDef, '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.update`, - 'invalidKey' - ) + 'invalidKey', + ), ); } @@ -135,8 +135,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { searchOrCreateDef, '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.updateInputFromSearchOutput`, - 'invalid' - ) + 'invalid', + ), ); } @@ -148,8 +148,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { searchOrCreateDef, '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.searchUniqueInputToOutputConstraint`, - 'invalid' - ) + 'invalid', + ), ); } @@ -167,7 +167,7 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { const searchOutputOptionHint = `(options: ${[...allSearchOutputKeys]})`; for (const [updateInputField, searchOutputField] of Object.entries( - searchOrCreateDef.updateInputFromSearchOutput + searchOrCreateDef.updateInputFromSearchOutput, )) { if (!updateInputKeys.includes(updateInputField)) { errors.push( @@ -176,8 +176,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { searchOrCreateDef, '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.updateInputFromSearchOutput`, - 'invalidKey' - ) + 'invalidKey', + ), ); } @@ -191,8 +191,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { searchOrCreateDef, '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.updateInputFromSearchOutput`, - 'invalidKey' - ) + 'invalidKey', + ), ); } } @@ -212,7 +212,7 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { const searchOutputOptionHint = `(options: ${[...allSearchOutputKeys]})`; for (const [searchInputField, searchOutputField] of Object.entries( - searchOrCreateDef.searchUniqueInputToOutputConstraint + searchOrCreateDef.searchUniqueInputToOutputConstraint, )) { if (!searchInputKeys.includes(searchInputField)) { errors.push( @@ -221,8 +221,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { searchOrCreateDef, '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.searchUniqueInputToOutputConstraint`, - 'invalidKey' - ) + 'invalidKey', + ), ); } @@ -237,8 +237,8 @@ const validateSearchCreateKeys = (definition, searchCreatesKey) => { searchOrCreateDef, '/SearchOrCreateSchema', `instance.${searchCreatesKey}.${key}.searchUniqueInputToOutputConstraint`, - 'invalidKey' - ) + 'invalidKey', + ), ); } } diff --git a/packages/schema/lib/functional-constraints/uniqueInputFieldKeys.js b/packages/schema/lib/functional-constraints/uniqueInputFieldKeys.js index 4ccfab90d..5c8631119 100644 --- a/packages/schema/lib/functional-constraints/uniqueInputFieldKeys.js +++ b/packages/schema/lib/functional-constraints/uniqueInputFieldKeys.js @@ -30,8 +30,8 @@ const uniqueInputFieldKeys = (definition) => { }.key`, inputField.key, `/BasicOperationSchema`, - `instance.${actionType}.${key}.operation.inputFields[${index}].key` - ) + `instance.${actionType}.${key}.operation.inputFields[${index}].key`, + ), ); } else { existingKeys[inputField.key] = `inputFields[${index}]`; @@ -48,13 +48,12 @@ const uniqueInputFieldKeys = (definition) => { }.key`, subField.key, `/BasicOperationSchema`, - `instance.${actionType}.${key}.operation.inputFields[${index}].children[${subFieldIndex}].key` - ) + `instance.${actionType}.${key}.operation.inputFields[${index}].children[${subFieldIndex}].key`, + ), ); } else { - existingKeys[ - subField.key - ] = `inputFields[${index}].children[${subFieldIndex}]`; + existingKeys[subField.key] = + `inputFields[${index}].children[${subFieldIndex}]`; } }); }); diff --git a/packages/schema/lib/schemas/AppSchema.js b/packages/schema/lib/schemas/AppSchema.js index 07c57597a..ffb55c13f 100644 --- a/packages/schema/lib/schemas/AppSchema.js +++ b/packages/schema/lib/schemas/AppSchema.js @@ -107,8 +107,7 @@ module.exports = makeSchema( $ref: AppFlagsSchema.id, }, throttle: { - description: - `Zapier uses this configuration to apply throttling when the limit for the window is exceeded. When set here, it is the default throttle configuration used on each action of the integration. And when set in an action's operation object, it gets overwritten for that action only.`, + description: `Zapier uses this configuration to apply throttling when the limit for the window is exceeded. When set here, it is the default throttle configuration used on each action of the integration. And when set in an action's operation object, it gets overwritten for that action only.`, $ref: ThrottleObjectSchema.id, }, legacy: { @@ -157,5 +156,5 @@ module.exports = makeSchema( HydratorsSchema, AppFlagsSchema, ThrottleObjectSchema, - ] + ], ); diff --git a/packages/schema/lib/schemas/AuthenticationCustomConfigSchema.js b/packages/schema/lib/schemas/AuthenticationCustomConfigSchema.js index c7451fa81..335393779 100644 --- a/packages/schema/lib/schemas/AuthenticationCustomConfigSchema.js +++ b/packages/schema/lib/schemas/AuthenticationCustomConfigSchema.js @@ -33,5 +33,5 @@ module.exports = makeSchema( ], antiExamples: [{ example: { foo: true }, reason: 'Invalid key.' }], }, - [RequestSchema, FunctionSchema] + [RequestSchema, FunctionSchema], ); diff --git a/packages/schema/lib/schemas/AuthenticationOAuth1ConfigSchema.js b/packages/schema/lib/schemas/AuthenticationOAuth1ConfigSchema.js index 7ccd65f53..ed8fbfa58 100644 --- a/packages/schema/lib/schemas/AuthenticationOAuth1ConfigSchema.js +++ b/packages/schema/lib/schemas/AuthenticationOAuth1ConfigSchema.js @@ -49,5 +49,5 @@ module.exports = makeSchema( }, ], }, - [FunctionSchema, RedirectRequestSchema, RequestSchema] + [FunctionSchema, RedirectRequestSchema, RequestSchema], ); diff --git a/packages/schema/lib/schemas/AuthenticationOAuth2ConfigSchema.js b/packages/schema/lib/schemas/AuthenticationOAuth2ConfigSchema.js index e1f508278..777020b40 100644 --- a/packages/schema/lib/schemas/AuthenticationOAuth2ConfigSchema.js +++ b/packages/schema/lib/schemas/AuthenticationOAuth2ConfigSchema.js @@ -74,5 +74,5 @@ module.exports = makeSchema( }, ], }, - [FunctionSchema, RedirectRequestSchema, RequestSchema] + [FunctionSchema, RedirectRequestSchema, RequestSchema], ); diff --git a/packages/schema/lib/schemas/AuthenticationSchema.js b/packages/schema/lib/schemas/AuthenticationSchema.js index dcbf987eb..8e8cedb18 100644 --- a/packages/schema/lib/schemas/AuthenticationSchema.js +++ b/packages/schema/lib/schemas/AuthenticationSchema.js @@ -114,5 +114,5 @@ module.exports = makeSchema( AuthenticationOAuth1ConfigSchema, AuthenticationOAuth2ConfigSchema, AuthenticationSessionConfigSchema, - ] + ], ); diff --git a/packages/schema/lib/schemas/AuthenticationSessionConfigSchema.js b/packages/schema/lib/schemas/AuthenticationSessionConfigSchema.js index 3af100816..1eac7c1e8 100644 --- a/packages/schema/lib/schemas/AuthenticationSessionConfigSchema.js +++ b/packages/schema/lib/schemas/AuthenticationSessionConfigSchema.js @@ -27,5 +27,5 @@ module.exports = makeSchema( }, ], }, - [FunctionSchema, RequestSchema] + [FunctionSchema, RequestSchema], ); diff --git a/packages/schema/lib/schemas/BasicActionOperationSchema.js b/packages/schema/lib/schemas/BasicActionOperationSchema.js index fd2e9cc11..553b8a7f5 100644 --- a/packages/schema/lib/schemas/BasicActionOperationSchema.js +++ b/packages/schema/lib/schemas/BasicActionOperationSchema.js @@ -10,7 +10,7 @@ const RequestSchema = require('./RequestSchema'); // TODO: would be nice to deep merge these instead // or maybe use allOf which is built into json-schema const BasicActionOperationSchema = JSON.parse( - JSON.stringify(BasicOperationSchema.schema) + JSON.stringify(BasicOperationSchema.schema), ); BasicActionOperationSchema.id = '/BasicActionOperationSchema'; @@ -57,5 +57,5 @@ BasicActionOperationSchema.antiExamples = [ module.exports = makeSchema( BasicActionOperationSchema, - BasicOperationSchema.dependencies + BasicOperationSchema.dependencies, ); diff --git a/packages/schema/lib/schemas/BasicCreateActionOperationSchema.js b/packages/schema/lib/schemas/BasicCreateActionOperationSchema.js index ae0b670c7..b5777ba83 100644 --- a/packages/schema/lib/schemas/BasicCreateActionOperationSchema.js +++ b/packages/schema/lib/schemas/BasicCreateActionOperationSchema.js @@ -10,7 +10,7 @@ const RequestSchema = require('./RequestSchema'); // TODO: would be nice to deep merge these instead // or maybe use allOf which is built into json-schema const BasicCreateActionOperationSchema = JSON.parse( - JSON.stringify(BasicActionOperationSchema.schema) + JSON.stringify(BasicActionOperationSchema.schema), ); BasicCreateActionOperationSchema.id = '/BasicCreateActionOperationSchema'; @@ -63,5 +63,5 @@ delete BasicCreateActionOperationSchema.required; module.exports = makeSchema( BasicCreateActionOperationSchema, - BasicActionOperationSchema.dependencies.concat(BufferConfigSchema) + BasicActionOperationSchema.dependencies.concat(BufferConfigSchema), ); diff --git a/packages/schema/lib/schemas/BasicHookOperationSchema.js b/packages/schema/lib/schemas/BasicHookOperationSchema.js index 6e2a450a3..a5322c324 100644 --- a/packages/schema/lib/schemas/BasicHookOperationSchema.js +++ b/packages/schema/lib/schemas/BasicHookOperationSchema.js @@ -10,7 +10,7 @@ const RequestSchema = require('./RequestSchema'); // TODO: would be nice to deep merge these instead // or maybe use allOf which is built into json-schema const BasicHookOperationSchema = JSON.parse( - JSON.stringify(BasicOperationSchema.schema) + JSON.stringify(BasicOperationSchema.schema), ); const hookTechnicallyRequired = @@ -113,5 +113,5 @@ BasicHookOperationSchema.antiExamples = [ module.exports = makeSchema( BasicHookOperationSchema, - BasicOperationSchema.dependencies + BasicOperationSchema.dependencies, ); diff --git a/packages/schema/lib/schemas/BasicHookToPollOperationSchema.js b/packages/schema/lib/schemas/BasicHookToPollOperationSchema.js index fb7ca6115..fdc71a9bf 100644 --- a/packages/schema/lib/schemas/BasicHookToPollOperationSchema.js +++ b/packages/schema/lib/schemas/BasicHookToPollOperationSchema.js @@ -10,7 +10,7 @@ const RequestSchema = require('./RequestSchema'); // TODO: would be nice to deep merge these instead // or maybe use allOf which is built into json-schema const BasicHookToPollOperationSchema = JSON.parse( - JSON.stringify(BasicOperationSchema.schema) + JSON.stringify(BasicOperationSchema.schema), ); BasicHookToPollOperationSchema.id = '/BasicHookToPollOperationSchema'; @@ -94,5 +94,5 @@ BasicHookToPollOperationSchema.antiExamples = [ module.exports = makeSchema( BasicHookToPollOperationSchema, - BasicOperationSchema.dependencies + BasicOperationSchema.dependencies, ); diff --git a/packages/schema/lib/schemas/BasicOperationSchema.js b/packages/schema/lib/schemas/BasicOperationSchema.js index beaa37cb0..eab2e1089 100644 --- a/packages/schema/lib/schemas/BasicOperationSchema.js +++ b/packages/schema/lib/schemas/BasicOperationSchema.js @@ -81,5 +81,13 @@ module.exports = makeSchema( ], additionalProperties: false, }, - [DynamicFieldsSchema, FunctionSchema, KeySchema, LockObjectSchema, RequestSchema, ResultsSchema, ThrottleObjectSchema] + [ + DynamicFieldsSchema, + FunctionSchema, + KeySchema, + LockObjectSchema, + RequestSchema, + ResultsSchema, + ThrottleObjectSchema, + ], ); diff --git a/packages/schema/lib/schemas/BasicPollingOperationSchema.js b/packages/schema/lib/schemas/BasicPollingOperationSchema.js index 8cec72921..7f62520eb 100644 --- a/packages/schema/lib/schemas/BasicPollingOperationSchema.js +++ b/packages/schema/lib/schemas/BasicPollingOperationSchema.js @@ -7,7 +7,7 @@ const BasicOperationSchema = require('./BasicOperationSchema'); // TODO: would be nice to deep merge these instead // or maybe use allOf which is built into json-schema const BasicPollingOperationSchema = JSON.parse( - JSON.stringify(BasicOperationSchema.schema) + JSON.stringify(BasicOperationSchema.schema), ); BasicPollingOperationSchema.id = '/BasicPollingOperationSchema'; @@ -38,5 +38,5 @@ BasicPollingOperationSchema.properties = { module.exports = makeSchema( BasicPollingOperationSchema, - BasicOperationSchema.dependencies + BasicOperationSchema.dependencies, ); diff --git a/packages/schema/lib/schemas/BulkReadSchema.js b/packages/schema/lib/schemas/BulkReadSchema.js index 898f04d9a..a0507d8c7 100644 --- a/packages/schema/lib/schemas/BulkReadSchema.js +++ b/packages/schema/lib/schemas/BulkReadSchema.js @@ -68,5 +68,5 @@ module.exports = makeSchema( ], additionalProperties: false, }, - [KeySchema, BasicDisplaySchema, BasicActionOperationSchema] + [KeySchema, BasicDisplaySchema, BasicActionOperationSchema], ); diff --git a/packages/schema/lib/schemas/BulkReadsSchema.js b/packages/schema/lib/schemas/BulkReadsSchema.js index 52b643d46..4a23fecd2 100644 --- a/packages/schema/lib/schemas/BulkReadsSchema.js +++ b/packages/schema/lib/schemas/BulkReadsSchema.js @@ -65,5 +65,5 @@ module.exports = makeSchema( }, ], }, - [BulkReadSchema] + [BulkReadSchema], ); diff --git a/packages/schema/lib/schemas/CreateSchema.js b/packages/schema/lib/schemas/CreateSchema.js index 4dbe87237..ea84bf607 100644 --- a/packages/schema/lib/schemas/CreateSchema.js +++ b/packages/schema/lib/schemas/CreateSchema.js @@ -104,5 +104,5 @@ module.exports = makeSchema( ], additionalProperties: false, }, - [BasicDisplaySchema, BasicCreateActionOperationSchema, KeySchema] + [BasicDisplaySchema, BasicCreateActionOperationSchema, KeySchema], ); diff --git a/packages/schema/lib/schemas/CreatesSchema.js b/packages/schema/lib/schemas/CreatesSchema.js index 4c5019439..a061f747d 100644 --- a/packages/schema/lib/schemas/CreatesSchema.js +++ b/packages/schema/lib/schemas/CreatesSchema.js @@ -75,5 +75,5 @@ module.exports = makeSchema( }, ], }, - [CreateSchema] + [CreateSchema], ); diff --git a/packages/schema/lib/schemas/DynamicFieldsSchema.js b/packages/schema/lib/schemas/DynamicFieldsSchema.js index f9b950464..e6a384e23 100644 --- a/packages/schema/lib/schemas/DynamicFieldsSchema.js +++ b/packages/schema/lib/schemas/DynamicFieldsSchema.js @@ -32,5 +32,5 @@ module.exports = makeSchema( }, ], }, - [FieldOrFunctionSchema] + [FieldOrFunctionSchema], ); diff --git a/packages/schema/lib/schemas/FieldChoiceWithLabelSchema.js b/packages/schema/lib/schemas/FieldChoiceWithLabelSchema.js index e3e218a68..6b28cc138 100644 --- a/packages/schema/lib/schemas/FieldChoiceWithLabelSchema.js +++ b/packages/schema/lib/schemas/FieldChoiceWithLabelSchema.js @@ -17,7 +17,7 @@ module.exports = makeSchema({ }, sample: { description: - "A legacy field that is no longer used by the editor, but it is still required for now and should match the value.", + 'A legacy field that is no longer used by the editor, but it is still required for now and should match the value.', type: 'string', minLength: 1, }, diff --git a/packages/schema/lib/schemas/FieldChoicesSchema.js b/packages/schema/lib/schemas/FieldChoicesSchema.js index 351ecfca2..135a5c32c 100644 --- a/packages/schema/lib/schemas/FieldChoicesSchema.js +++ b/packages/schema/lib/schemas/FieldChoicesSchema.js @@ -36,5 +36,5 @@ module.exports = makeSchema( }, ], }, - [FieldChoiceWithLabelSchema] + [FieldChoiceWithLabelSchema], ); diff --git a/packages/schema/lib/schemas/FieldOrFunctionSchema.js b/packages/schema/lib/schemas/FieldOrFunctionSchema.js index 9a9025f55..8ce2d6040 100644 --- a/packages/schema/lib/schemas/FieldOrFunctionSchema.js +++ b/packages/schema/lib/schemas/FieldOrFunctionSchema.js @@ -36,5 +36,5 @@ module.exports = makeSchema( }, ], }, - [FieldSchema, FunctionSchema] + [FieldSchema, FunctionSchema], ); diff --git a/packages/schema/lib/schemas/FieldSchema.js b/packages/schema/lib/schemas/FieldSchema.js index ec76f62d3..91d832c82 100644 --- a/packages/schema/lib/schemas/FieldSchema.js +++ b/packages/schema/lib/schemas/FieldSchema.js @@ -206,5 +206,5 @@ module.exports = makeSchema( ], additionalProperties: false, }, - [RefResourceSchema, FieldChoicesSchema, FieldMetaSchema] + [RefResourceSchema, FieldChoicesSchema, FieldMetaSchema], ); diff --git a/packages/schema/lib/schemas/FieldsSchema.js b/packages/schema/lib/schemas/FieldsSchema.js index 21e3bd8b8..987a8c3a7 100644 --- a/packages/schema/lib/schemas/FieldsSchema.js +++ b/packages/schema/lib/schemas/FieldsSchema.js @@ -13,5 +13,5 @@ module.exports = makeSchema( examples: [[{ key: 'abc' }]], antiExamples: [{ example: {}, reason: 'Must be an array' }], }, - [FieldSchema] + [FieldSchema], ); diff --git a/packages/schema/lib/schemas/FunctionSchema.js b/packages/schema/lib/schemas/FunctionSchema.js index 8b05dbd47..45ed92d6b 100644 --- a/packages/schema/lib/schemas/FunctionSchema.js +++ b/packages/schema/lib/schemas/FunctionSchema.js @@ -38,5 +38,5 @@ module.exports = makeSchema( }, ], }, - [FunctionRequireSchema, FunctionSourceSchema] + [FunctionRequireSchema, FunctionSourceSchema], ); diff --git a/packages/schema/lib/schemas/HydratorsSchema.js b/packages/schema/lib/schemas/HydratorsSchema.js index 92a86b4a7..7cf3badad 100644 --- a/packages/schema/lib/schemas/HydratorsSchema.js +++ b/packages/schema/lib/schemas/HydratorsSchema.js @@ -25,5 +25,5 @@ module.exports = makeSchema( }, ], }, - [FunctionSchema] + [FunctionSchema], ); diff --git a/packages/schema/lib/schemas/MiddlewaresSchema.js b/packages/schema/lib/schemas/MiddlewaresSchema.js index dc338ca48..ac6b44e2e 100644 --- a/packages/schema/lib/schemas/MiddlewaresSchema.js +++ b/packages/schema/lib/schemas/MiddlewaresSchema.js @@ -31,5 +31,5 @@ module.exports = makeSchema( }, ], }, - [FunctionSchema] + [FunctionSchema], ); diff --git a/packages/schema/lib/schemas/RedirectRequestSchema.js b/packages/schema/lib/schemas/RedirectRequestSchema.js index 42e355252..423ce7b35 100644 --- a/packages/schema/lib/schemas/RedirectRequestSchema.js +++ b/packages/schema/lib/schemas/RedirectRequestSchema.js @@ -37,5 +37,5 @@ module.exports = makeSchema( }, ], }, - [FlatObjectSchema] + [FlatObjectSchema], ); diff --git a/packages/schema/lib/schemas/RequestSchema.js b/packages/schema/lib/schemas/RequestSchema.js index 3b73584c7..2e175afaf 100644 --- a/packages/schema/lib/schemas/RequestSchema.js +++ b/packages/schema/lib/schemas/RequestSchema.js @@ -110,5 +110,5 @@ module.exports = makeSchema( }, ], }, - [FlatObjectSchema, FunctionSchema] + [FlatObjectSchema, FunctionSchema], ); diff --git a/packages/schema/lib/schemas/ResourceMethodCreateSchema.js b/packages/schema/lib/schemas/ResourceMethodCreateSchema.js index 18fe3b206..48cf85fb1 100644 --- a/packages/schema/lib/schemas/ResourceMethodCreateSchema.js +++ b/packages/schema/lib/schemas/ResourceMethodCreateSchema.js @@ -63,5 +63,5 @@ module.exports = makeSchema( }, ], }, - [BasicDisplaySchema, BasicActionOperationSchema] + [BasicDisplaySchema, BasicActionOperationSchema], ); diff --git a/packages/schema/lib/schemas/ResourceMethodGetSchema.js b/packages/schema/lib/schemas/ResourceMethodGetSchema.js index 81ac990f9..3c23e4a74 100644 --- a/packages/schema/lib/schemas/ResourceMethodGetSchema.js +++ b/packages/schema/lib/schemas/ResourceMethodGetSchema.js @@ -70,5 +70,5 @@ module.exports = makeSchema( }, ], }, - [BasicDisplaySchema, BasicOperationSchema] + [BasicDisplaySchema, BasicOperationSchema], ); diff --git a/packages/schema/lib/schemas/ResourceMethodHookSchema.js b/packages/schema/lib/schemas/ResourceMethodHookSchema.js index f4922a0ea..dc0a35aca 100644 --- a/packages/schema/lib/schemas/ResourceMethodHookSchema.js +++ b/packages/schema/lib/schemas/ResourceMethodHookSchema.js @@ -68,5 +68,5 @@ module.exports = makeSchema( }, ], }, - [BasicDisplaySchema, BasicHookOperationSchema] + [BasicDisplaySchema, BasicHookOperationSchema], ); diff --git a/packages/schema/lib/schemas/ResourceMethodListSchema.js b/packages/schema/lib/schemas/ResourceMethodListSchema.js index 2a65a3d90..7904f89c1 100644 --- a/packages/schema/lib/schemas/ResourceMethodListSchema.js +++ b/packages/schema/lib/schemas/ResourceMethodListSchema.js @@ -72,5 +72,5 @@ module.exports = makeSchema( }, ], }, - [BasicDisplaySchema, BasicPollingOperationSchema] + [BasicDisplaySchema, BasicPollingOperationSchema], ); diff --git a/packages/schema/lib/schemas/ResourceMethodSearchSchema.js b/packages/schema/lib/schemas/ResourceMethodSearchSchema.js index d92a360fb..c537d8890 100644 --- a/packages/schema/lib/schemas/ResourceMethodSearchSchema.js +++ b/packages/schema/lib/schemas/ResourceMethodSearchSchema.js @@ -63,5 +63,5 @@ module.exports = makeSchema( }, ], }, - [BasicDisplaySchema, BasicActionOperationSchema] + [BasicDisplaySchema, BasicActionOperationSchema], ); diff --git a/packages/schema/lib/schemas/ResourceSchema.js b/packages/schema/lib/schemas/ResourceSchema.js index 8266fea6f..5a000b83d 100644 --- a/packages/schema/lib/schemas/ResourceSchema.js +++ b/packages/schema/lib/schemas/ResourceSchema.js @@ -164,5 +164,5 @@ module.exports = makeSchema( ResourceMethodCreateSchema, DynamicFieldsSchema, KeySchema, - ] + ], ); diff --git a/packages/schema/lib/schemas/ResourcesMethodGetSchema.js b/packages/schema/lib/schemas/ResourcesMethodGetSchema.js index 4f880698f..6451240ed 100644 --- a/packages/schema/lib/schemas/ResourcesMethodGetSchema.js +++ b/packages/schema/lib/schemas/ResourcesMethodGetSchema.js @@ -53,5 +53,5 @@ module.exports = makeSchema( }, additionalProperties: false, }, - [BasicDisplaySchema, BasicActionOperationSchema] + [BasicDisplaySchema, BasicActionOperationSchema], ); diff --git a/packages/schema/lib/schemas/ResourcesSchema.js b/packages/schema/lib/schemas/ResourcesSchema.js index ed4175d15..1cf695d9b 100644 --- a/packages/schema/lib/schemas/ResourcesSchema.js +++ b/packages/schema/lib/schemas/ResourcesSchema.js @@ -91,5 +91,5 @@ module.exports = makeSchema( }, ], }, - [ResourceSchema] + [ResourceSchema], ); diff --git a/packages/schema/lib/schemas/SearchAndCreatesSchema.js b/packages/schema/lib/schemas/SearchAndCreatesSchema.js index 40883a13d..55665edcc 100644 --- a/packages/schema/lib/schemas/SearchAndCreatesSchema.js +++ b/packages/schema/lib/schemas/SearchAndCreatesSchema.js @@ -10,5 +10,5 @@ module.exports = makeSchema( id: '/SearchAndCreatesSchema', description: 'Alias for /SearchOrCreatesSchema', }, - [SearchOrCreatesSchema] + [SearchOrCreatesSchema], ); diff --git a/packages/schema/lib/schemas/SearchOrCreateSchema.js b/packages/schema/lib/schemas/SearchOrCreateSchema.js index 87fe56900..e4dcc1582 100644 --- a/packages/schema/lib/schemas/SearchOrCreateSchema.js +++ b/packages/schema/lib/schemas/SearchOrCreateSchema.js @@ -134,5 +134,5 @@ module.exports = makeSchema( }, ], }, - [BasicDisplaySchema, KeySchema, FlatObjectSchema] + [BasicDisplaySchema, KeySchema, FlatObjectSchema], ); diff --git a/packages/schema/lib/schemas/SearchOrCreatesSchema.js b/packages/schema/lib/schemas/SearchOrCreatesSchema.js index a25fd599e..8de87e993 100644 --- a/packages/schema/lib/schemas/SearchOrCreatesSchema.js +++ b/packages/schema/lib/schemas/SearchOrCreatesSchema.js @@ -69,5 +69,5 @@ module.exports = makeSchema( }, ], }, - [SearchOrCreateSchema] + [SearchOrCreateSchema], ); diff --git a/packages/schema/lib/schemas/SearchSchema.js b/packages/schema/lib/schemas/SearchSchema.js index 828a891b4..5e2624a1c 100644 --- a/packages/schema/lib/schemas/SearchSchema.js +++ b/packages/schema/lib/schemas/SearchSchema.js @@ -80,5 +80,5 @@ module.exports = makeSchema( }, ], }, - [BasicDisplaySchema, BasicActionOperationSchema, KeySchema] + [BasicDisplaySchema, BasicActionOperationSchema, KeySchema], ); diff --git a/packages/schema/lib/schemas/SearchesSchema.js b/packages/schema/lib/schemas/SearchesSchema.js index d860cfbb3..31d5d9d1d 100644 --- a/packages/schema/lib/schemas/SearchesSchema.js +++ b/packages/schema/lib/schemas/SearchesSchema.js @@ -51,5 +51,5 @@ module.exports = makeSchema( }, ], }, - [SearchSchema] + [SearchSchema], ); diff --git a/packages/schema/lib/schemas/ThrottleObjectSchema.js b/packages/schema/lib/schemas/ThrottleObjectSchema.js index fe833bd38..761098467 100644 --- a/packages/schema/lib/schemas/ThrottleObjectSchema.js +++ b/packages/schema/lib/schemas/ThrottleObjectSchema.js @@ -127,5 +127,5 @@ module.exports = makeSchema( ], additionalProperties: false, }, - [ThrottleOverrideObjectSchema] + [ThrottleOverrideObjectSchema], ); diff --git a/packages/schema/lib/schemas/TriggerSchema.js b/packages/schema/lib/schemas/TriggerSchema.js index f8e8e34c5..35a2c3d9e 100644 --- a/packages/schema/lib/schemas/TriggerSchema.js +++ b/packages/schema/lib/schemas/TriggerSchema.js @@ -92,5 +92,5 @@ module.exports = makeSchema( BasicPollingOperationSchema, BasicHookOperationSchema, BasicHookToPollOperationSchema, - ] + ], ); diff --git a/packages/schema/lib/schemas/TriggersSchema.js b/packages/schema/lib/schemas/TriggersSchema.js index 902a2823b..25a3d988f 100644 --- a/packages/schema/lib/schemas/TriggersSchema.js +++ b/packages/schema/lib/schemas/TriggersSchema.js @@ -57,5 +57,5 @@ module.exports = makeSchema( }, ], }, - [TriggerSchema] + [TriggerSchema], ); diff --git a/packages/schema/lib/utils/buildDocs.js b/packages/schema/lib/utils/buildDocs.js index 31c423e0d..acb511d7a 100644 --- a/packages/schema/lib/utils/buildDocs.js +++ b/packages/schema/lib/utils/buildDocs.js @@ -59,7 +59,7 @@ const formatExample = (example) => { return `* ${quoteOrNa( util.inspect(ex, { depth: null, breakLength: BREAK_LENGTH }), true, - ' ' + ' ', )}`.replace(/\s+\n/gm, '\n'); }; @@ -205,7 +205,7 @@ const buildDocs = (InitSchema) => { # \`zapier-platform-schema\` Generated Documentation This is automatically generated by the \`npm run docs\` command in \`zapier-platform-schema\` version ${quoteOrNa( - packageJson.version + packageJson.version, )}. ----- diff --git a/packages/schema/lib/utils/exportSchema.js b/packages/schema/lib/utils/exportSchema.js index 80a76a6aa..98b3bde39 100644 --- a/packages/schema/lib/utils/exportSchema.js +++ b/packages/schema/lib/utils/exportSchema.js @@ -12,7 +12,7 @@ const exportSchema = (InitSchema) => { exportedSchema.schemas[Schema.id.replace('/', '')] = _.omit( Schema.schema, 'examples', - 'antiExamples' + 'antiExamples', ); Schema.dependencies.map(addAndRecurse); }; diff --git a/packages/schema/lib/utils/makeValidator.js b/packages/schema/lib/utils/makeValidator.js index e7fdd2e54..6b73e870a 100644 --- a/packages/schema/lib/utils/makeValidator.js +++ b/packages/schema/lib/utils/makeValidator.js @@ -45,7 +45,7 @@ const processBaseError = (err, path) => { // the subschemas have a type property err.message = err.message.replace( subschema, - err.schema[err.name][idx].type || 'unknown' + err.schema[err.name][idx].type || 'unknown', ); } }); @@ -105,8 +105,8 @@ const cleanError = (validationError, path, validator, definition) => { e, makePath(path, validationError.property), validator, - definition - ) + definition, + ), ); }); @@ -131,10 +131,10 @@ const makeValidator = (mainSchema, subSchemas) => { validate: (definition) => { const results = v.validate(definition, mainSchema); const allErrors = results.errors.concat( - functionalConstraints.run(definition, mainSchema) + functionalConstraints.run(definition, mainSchema), ); const cleanedErrors = flattenDeep( - allErrors.map((e) => cleanError(e, '', v, definition)) + allErrors.map((e) => cleanError(e, '', v, definition)), ); results.errors = cleanedErrors.map((error) => { diff --git a/packages/schema/smoke-test/smoke-test.js b/packages/schema/smoke-test/smoke-test.js index b66a5feb1..0d8619abb 100644 --- a/packages/schema/smoke-test/smoke-test.js +++ b/packages/schema/smoke-test/smoke-test.js @@ -68,7 +68,7 @@ describe('smoke tests - setup will take some time', () => { context.testScripts.validate = copyTestScript( 'test-validate', - context.workdir + context.workdir, ); context.testScripts.export = copyTestScript('test-export', context.workdir); console.log('setup complete!'); @@ -86,7 +86,7 @@ describe('smoke tests - setup will take some time', () => { const latestVersion = packageInfo['dist-tags'].latest; res = await fetch( - `${baseUrl}/-/zapier-platform-schema-${latestVersion}.tgz` + `${baseUrl}/-/zapier-platform-schema-${latestVersion}.tgz`, ); const baselineSize = res.headers.get('content-length'); const newSize = fs.statSync(context.package.path).size; @@ -113,7 +113,7 @@ describe('smoke tests - setup will take some time', () => { context.workdir, 'node_modules', 'zapier-platform-schema', - 'exported-schema.json' + 'exported-schema.json', ); fs.existsSync(exportedSchemaPath).should.be.true(); @@ -128,7 +128,7 @@ describe('smoke tests - setup will take some time', () => { schemaInPackage.should.eql( expectedSchema, - 'exported-schema.json is not up-to-date. Try `npm run export`.' + 'exported-schema.json is not up-to-date. Try `npm run export`.', ); }); }); diff --git a/packages/schema/test/functional-constraints/bufferedCreateConstraints.js b/packages/schema/test/functional-constraints/bufferedCreateConstraints.js index 24e2936b8..7f95922d3 100644 --- a/packages/schema/test/functional-constraints/bufferedCreateConstraints.js +++ b/packages/schema/test/functional-constraints/bufferedCreateConstraints.js @@ -38,10 +38,10 @@ describe('bufferedCreateConstraints', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(2); results.errors[0].stack.should.eql( - 'instance.creates.foo.operation must contain property "performBuffer" because property "buffer" is present.' + 'instance.creates.foo.operation must contain property "performBuffer" because property "buffer" is present.', ); results.errors[1].stack.should.eql( - 'instance.creates.foo.operation must not contain property "perform" because it is mutually exclusive with property "buffer".' + 'instance.creates.foo.operation must not contain property "perform" because it is mutually exclusive with property "buffer".', ); }); @@ -53,10 +53,10 @@ describe('bufferedCreateConstraints', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(2); results.errors[0].stack.should.eql( - 'instance.creates.foo.operation must contain property "buffer" because property "performBuffer" is present.' + 'instance.creates.foo.operation must contain property "buffer" because property "performBuffer" is present.', ); results.errors[1].stack.should.eql( - 'instance.creates.foo.operation must not contain property "perform" because it is mutually exclusive with property "performBuffer".' + 'instance.creates.foo.operation must not contain property "perform" because it is mutually exclusive with property "performBuffer".', ); }); @@ -71,7 +71,7 @@ describe('bufferedCreateConstraints', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.creates.foo.operation must contain property "performBuffer" because property "buffer" is present.' + 'instance.creates.foo.operation must contain property "performBuffer" because property "buffer" is present.', ); }); @@ -86,10 +86,10 @@ describe('bufferedCreateConstraints', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(2); results.errors[0].stack.should.eql( - 'instance.creates.foo.operation must contain property "performBuffer" because property "buffer" is present.' + 'instance.creates.foo.operation must contain property "performBuffer" because property "buffer" is present.', ); results.errors[1].stack.should.eql( - 'instance.creates.foo.operation.buffer.groupedBy[0] cannot use optional or non-existent inputField "location".' + 'instance.creates.foo.operation.buffer.groupedBy[0] cannot use optional or non-existent inputField "location".', ); }); @@ -101,7 +101,7 @@ describe('bufferedCreateConstraints', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.creates.foo.operation must contain property "buffer" because property "performBuffer" is present.' + 'instance.creates.foo.operation must contain property "buffer" because property "performBuffer" is present.', ); }); @@ -113,7 +113,7 @@ describe('bufferedCreateConstraints', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.creates.foo.operation requires property "perform".' + 'instance.creates.foo.operation requires property "perform".', ); }); diff --git a/packages/schema/test/functional-constraints/deepNestedFields.js b/packages/schema/test/functional-constraints/deepNestedFields.js index 380e84ba9..a60cc2f85 100644 --- a/packages/schema/test/functional-constraints/deepNestedFields.js +++ b/packages/schema/test/functional-constraints/deepNestedFields.js @@ -76,7 +76,7 @@ describe('deepNestedFields', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.creates.foo.inputFields[1] must not contain deeply nested child fields. One level max.' + 'instance.creates.foo.inputFields[1] must not contain deeply nested child fields. One level max.', ); }); }); diff --git a/packages/schema/test/functional-constraints/mutuallyExclusiveFields.js b/packages/schema/test/functional-constraints/mutuallyExclusiveFields.js index 820cf5cb3..f0e943f43 100644 --- a/packages/schema/test/functional-constraints/mutuallyExclusiveFields.js +++ b/packages/schema/test/functional-constraints/mutuallyExclusiveFields.js @@ -75,7 +75,7 @@ describe('mutuallyExclusiveFields', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - "instance.creates.foo.inputFields[1] must not contain children and list, as they're mutually exclusive." + "instance.creates.foo.inputFields[1] must not contain children and list, as they're mutually exclusive.", ); }); @@ -146,7 +146,7 @@ describe('mutuallyExclusiveFields', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - "instance.creates.foo.inputFields[1] must not contain dict and list, as they're mutually exclusive." + "instance.creates.foo.inputFields[1] must not contain dict and list, as they're mutually exclusive.", ); }); @@ -185,7 +185,7 @@ describe('mutuallyExclusiveFields', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - "instance.creates.foo.inputFields[0] must not contain dynamic and dict, as they're mutually exclusive." + "instance.creates.foo.inputFields[0] must not contain dynamic and dict, as they're mutually exclusive.", ); }); @@ -263,7 +263,7 @@ describe('mutuallyExclusiveFields', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - "instance.creates.foo.inputFields[0] must not contain dynamic and choices, as they're mutually exclusive." + "instance.creates.foo.inputFields[0] must not contain dynamic and choices, as they're mutually exclusive.", ); }); }); diff --git a/packages/schema/test/functional-constraints/pollingThrottle.js b/packages/schema/test/functional-constraints/pollingThrottle.js index 2271b2b2d..f7767b881 100644 --- a/packages/schema/test/functional-constraints/pollingThrottle.js +++ b/packages/schema/test/functional-constraints/pollingThrottle.js @@ -42,7 +42,7 @@ describe('pollingThrottle', () => { results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.triggers.foo.operation.throttle must not use the "retry" field for a polling trigger.' + 'instance.triggers.foo.operation.throttle must not use the "retry" field for a polling trigger.', ); // for polling trigger with operation.type unset @@ -50,7 +50,7 @@ describe('pollingThrottle', () => { results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.triggers.foo.operation.throttle must not use the "retry" field for a polling trigger.' + 'instance.triggers.foo.operation.throttle must not use the "retry" field for a polling trigger.', ); }); diff --git a/packages/schema/test/functional-constraints/searchOrCreateKeys.js b/packages/schema/test/functional-constraints/searchOrCreateKeys.js index e19507624..662ef205b 100644 --- a/packages/schema/test/functional-constraints/searchOrCreateKeys.js +++ b/packages/schema/test/functional-constraints/searchOrCreateKeys.js @@ -126,7 +126,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchAndCreates.findOrCreateProduct additionalProperty "test" exists in instance when not allowed' + 'instance.searchAndCreates.findOrCreateProduct additionalProperty "test" exists in instance when not allowed', ); }); @@ -150,7 +150,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.key must match a "key" from a search (options: find_product)' + 'instance.searchOrCreates.findOrCreateProduct.key must match a "key" from a search (options: find_product)', ); }); @@ -174,7 +174,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchAndCreates.findOrCreateProduct.key must match a "key" from a search (options: find_product)' + 'instance.searchAndCreates.findOrCreateProduct.key must match a "key" from a search (options: find_product)', ); }); @@ -198,7 +198,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.create must match a "key" from a create (options: add_product,update_product)' + 'instance.searchOrCreates.findOrCreateProduct.create must match a "key" from a create (options: add_product,update_product)', ); }); @@ -222,7 +222,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchAndCreates.findOrCreateProduct.create must match a "key" from a create (options: add_product,update_product)' + 'instance.searchAndCreates.findOrCreateProduct.create must match a "key" from a create (options: add_product,update_product)', ); }); @@ -247,7 +247,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.update must match a "key" from a create (options: add_product,update_product)' + 'instance.searchOrCreates.findOrCreateProduct.update must match a "key" from a create (options: add_product,update_product)', ); }); @@ -274,7 +274,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.updateInputFromSearchOutput requires searchOrCreates.findOrCreateProduct.update to be defined' + 'instance.searchOrCreates.findOrCreateProduct.updateInputFromSearchOutput requires searchOrCreates.findOrCreateProduct.update to be defined', ); }); @@ -301,7 +301,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint requires searchOrCreates.findOrCreateProduct.update to be defined' + 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint requires searchOrCreates.findOrCreateProduct.update to be defined', ); }); @@ -329,7 +329,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.updateInputFromSearchOutput object key must match a "key" from a creates.update_product.operation.inputFields (options: product_id)' + 'instance.searchOrCreates.findOrCreateProduct.updateInputFromSearchOutput object key must match a "key" from a creates.update_product.operation.inputFields (options: product_id)', ); }); @@ -357,7 +357,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.updateInputFromSearchOutput object value must match a "key" from searches.find_product.operation.(outputFields|sample) (options: id,title)' + 'instance.searchOrCreates.findOrCreateProduct.updateInputFromSearchOutput object value must match a "key" from searches.find_product.operation.(outputFields|sample) (options: id,title)', ); }); @@ -408,7 +408,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint object key must match a "key" from a searches.find_product.operation.inputFields (no "key" found in inputFields)' + 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint object key must match a "key" from a searches.find_product.operation.inputFields (no "key" found in inputFields)', ); }); @@ -437,7 +437,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint object key must match a "key" from a searches.find_product.operation.inputFields (options: product_title)' + 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint object key must match a "key" from a searches.find_product.operation.inputFields (options: product_title)', ); }); @@ -465,7 +465,7 @@ describe('searchOrCreateKeys', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(1); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint object value must match a "key" from searches.find_product.operation.(outputFields|sample) (options: id,title)' + 'instance.searchOrCreates.findOrCreateProduct.searchUniqueInputToOutputConstraint object value must match a "key" from searches.find_product.operation.(outputFields|sample) (options: id,title)', ); }); @@ -518,10 +518,10 @@ describe('searchOrCreateKeys', () => { // the wrong type, we don't want to validate its content. results.errors.should.have.length(2); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.find_product.updateInputFromSearchOutput is not of a type(s) object' + 'instance.searchOrCreates.find_product.updateInputFromSearchOutput is not of a type(s) object', ); results.errors[1].stack.should.eql( - 'instance.searchOrCreates.find_product.searchUniqueInputToOutputConstraint is not of a type(s) object' + 'instance.searchOrCreates.find_product.searchUniqueInputToOutputConstraint is not of a type(s) object', ); }); diff --git a/packages/schema/test/functional-constraints/uniqueInputFieldKeys.js b/packages/schema/test/functional-constraints/uniqueInputFieldKeys.js index 375cf5313..6603a4f7d 100644 --- a/packages/schema/test/functional-constraints/uniqueInputFieldKeys.js +++ b/packages/schema/test/functional-constraints/uniqueInputFieldKeys.js @@ -33,7 +33,7 @@ describe('uniqueInputFieldKeys', () => { .every( (err) => err.message === - 'inputField keys must be unique for each action. The key "name" is already in use at creates.foo.operation.inputFields[0].key' + 'inputField keys must be unique for each action. The key "name" is already in use at creates.foo.operation.inputFields[0].key', ) .should.be.true(); }); @@ -73,10 +73,10 @@ describe('uniqueInputFieldKeys', () => { results.errors.should.have.length(2); results.errors[0].message.should.eql( - `inputField keys must be unique for each action, even if they're children. The key "name" is already in use at creates.foo.operation.inputFields[0].children[1].key` + `inputField keys must be unique for each action, even if they're children. The key "name" is already in use at creates.foo.operation.inputFields[0].children[1].key`, ); results.errors[1].message.should.eql( - `inputField keys must be unique for each action. The key "name" is already in use at creates.foo.operation.inputFields[0].children[1].key` + `inputField keys must be unique for each action. The key "name" is already in use at creates.foo.operation.inputFields[0].children[1].key`, ); }); @@ -113,7 +113,7 @@ describe('uniqueInputFieldKeys', () => { .every( (err) => err.message === - `inputField keys must be unique for each action, even if they're children. The key "name" is already in use at creates.foo.operation.inputFields[0].children[0].key` + `inputField keys must be unique for each action, even if they're children. The key "name" is already in use at creates.foo.operation.inputFields[0].children[0].key`, ) .should.be.true(); }); diff --git a/packages/schema/test/index.js b/packages/schema/test/index.js index 9e09f9bab..e8268b684 100644 --- a/packages/schema/test/index.js +++ b/packages/schema/test/index.js @@ -34,7 +34,7 @@ describe('app', () => { delete appCopy.triggers.contact_by_tag; const results = schema.validateAppDefinition(appCopy); results.errors[0].stack.should.eql( - 'instance.triggers additionalProperty "3contact_by_tag" exists in instance when not allowed' + 'instance.triggers additionalProperty "3contact_by_tag" exists in instance when not allowed', ); results.errors.length.should.eql(2); // additional property error + top-level key doesn't match trigger key }); @@ -45,7 +45,7 @@ describe('app', () => { delete appCopy.creates.tag_create; const results = schema.validateAppDefinition(appCopy); results.errors[0].stack.should.eql( - 'instance.creates additionalProperty "3contact_by_tag" exists in instance when not allowed' + 'instance.creates additionalProperty "3contact_by_tag" exists in instance when not allowed', ); results.errors.length.should.eql(2); // additional property error + top-level key doesn't match create key }); @@ -55,7 +55,7 @@ describe('app', () => { appCopy.creates.tag_create.key = 'tag:create'; const results = schema.validateAppDefinition(appCopy); results.errors[0].stack.should.eql( - 'instance.creates.tag_create.key does not match pattern "^[a-zA-Z]+[a-zA-Z0-9_]*$"' + 'instance.creates.tag_create.key does not match pattern "^[a-zA-Z]+[a-zA-Z0-9_]*$"', ); results.errors.length.should.eql(2); // invalid name and top-level key doesn't match create key }); @@ -155,13 +155,13 @@ describe('app', () => { const results = schema.validateAppDefinition(definition); results.errors.should.have.length(3); results.errors[0].stack.should.eql( - 'instance.searchOrCreates.fooSearchOrCreate.key must match a "key" from a search (options: fooSearch)' + 'instance.searchOrCreates.fooSearchOrCreate.key must match a "key" from a search (options: fooSearch)', ); results.errors[1].stack.should.eql( - 'instance.searchOrCreates.fooSearchOrCreate.search must match a "key" from a search (options: fooSearch)' + 'instance.searchOrCreates.fooSearchOrCreate.search must match a "key" from a search (options: fooSearch)', ); results.errors[2].stack.should.eql( - 'instance.searchOrCreates.fooSearchOrCreate.create must match a "key" from a create (options: fooCreate)' + 'instance.searchOrCreates.fooSearchOrCreate.create must match a "key" from a create (options: fooCreate)', ); }); @@ -238,6 +238,6 @@ describe('app', () => { describe('auto test', () => { const _exportedSchema = schema.exportSchema(); Object.keys(_exportedSchema.schemas).map((id) => - testUtils.testInlineSchemaExamples(id) + testUtils.testInlineSchemaExamples(id), ); }); diff --git a/packages/schema/test/readability.js b/packages/schema/test/readability.js index 96f9b9954..8e7647c8b 100644 --- a/packages/schema/test/readability.js +++ b/packages/schema/test/readability.js @@ -33,7 +33,7 @@ describe('readability', () => { results.errors.should.have.length(1); should(results.errors[0].property.endsWith('instance')).be.false(); results.errors[0].stack.should.eql( - 'instance.display.label does not meet minimum length of 2' + 'instance.display.label does not meet minimum length of 2', ); }); @@ -92,7 +92,7 @@ describe('readability', () => { results.errors.should.have.length(1); should(results.errors[0].property.endsWith('instance')).be.false(); results.errors[0].property.should.eql( - 'instance.operation.inputFields[0].default' + 'instance.operation.inputFields[0].default', ); results.errors[0].message.should.eql('does not meet minimum length of 1'); }); @@ -116,7 +116,7 @@ describe('readability', () => { results.errors.should.have.length(1); results.errors[0].property.should.eql('instance.operation.perform.body'); should( - results.errors[0].message.includes('null,string,object,array') + results.errors[0].message.includes('null,string,object,array'), ).be.true(); should(results.errors[0].property.endsWith('instance')).be.false(); results.errors[0].docLinks.length.should.eql(0); @@ -144,10 +144,10 @@ describe('readability', () => { }); results.errors.should.have.length(1); results.errors[0].property.should.eql( - 'instance.operation.inputFields[0].choices' + 'instance.operation.inputFields[0].choices', ); should( - results.errors[0].docLinks[0].includes('schema#fieldchoicesschema') + results.errors[0].docLinks[0].includes('schema#fieldchoicesschema'), ).be.true(); should(results.errors[0].property.endsWith('instance')).be.false(); }); diff --git a/schema-to-ts/package.json b/schema-to-ts/package.json index cd47f0ad2..871df0b68 100644 --- a/schema-to-ts/package.json +++ b/schema-to-ts/package.json @@ -23,7 +23,7 @@ "marked": "^12.0.2", "pino": "^9.1.0", "pino-pretty": "^11.0.0", - "prettier": "^3.2.5", + "prettier": "^3.4.1", "word-wrap": "^1.2.5" }, "devDependencies": { diff --git a/scripts/bump.js b/scripts/bump.js index 742389051..7ea37ef8d 100755 --- a/scripts/bump.js +++ b/scripts/bump.js @@ -1,5 +1,5 @@ #!/usr/bin/env node - +/* eslint-disable array-callback-return */ const fs = require('fs'); const path = require('path'); @@ -29,7 +29,7 @@ const PACKAGE_ORIG_VERSIONS = [ REPO_DIR, 'packages', packageName, - 'package.json' + 'package.json', ); const packageJson = readJson(packageJsonPath); return { ...result, [packageName]: packageJson.version }; @@ -44,7 +44,7 @@ const ensureMainPackageVersionsAreSame = () => { ) { throw new Error( 'Packages must have the same version number.\nInstead, we got ' + - JSON.stringify(PACKAGE_ORIG_VERSIONS) + JSON.stringify(PACKAGE_ORIG_VERSIONS), ); } }; @@ -75,7 +75,7 @@ const ensureNoUncommittedChanges = () => { const result = spawnSync( 'git', ['status', '--untracked-files=no', '--porcelain'], - { encoding: 'utf8' } + { encoding: 'utf8' }, ); const lines = result.stdout .split(/\r?\n/) @@ -84,7 +84,7 @@ const ensureNoUncommittedChanges = () => { if (lines.length > 0) { throw new Error( `${bold.underline('git status')} shows you have uncommitted changes. ` + - 'Commit or discard those before you try again.' + 'Commit or discard those before you try again.', ); } }; @@ -145,7 +145,7 @@ const bumpMainPackagesForExampleApps = (versionToBump) => { const depVersion = packageJson.dependencies[packageFullName]; if (depVersion) { console.log( - `${item.name}'s dependency ${packageName} ${depVersion} -> ${versionToBump}` + `${item.name}'s dependency ${packageName} ${depVersion} -> ${versionToBump}`, ); packageJson.dependencies[packageFullName] = versionToBump; } @@ -166,12 +166,12 @@ const bumpMainPackages = (versionToBump) => { REPO_DIR, 'packages', packageName, - 'package.json' + 'package.json', ); const packageJson = readJson(packageJsonPath); console.log( - `${packageName} ${PACKAGE_ORIG_VERSIONS[packageName]} -> ${versionToBump}` + `${packageName} ${PACKAGE_ORIG_VERSIONS[packageName]} -> ${versionToBump}`, ); packageJson.version = versionToBump; @@ -180,7 +180,7 @@ const bumpMainPackages = (versionToBump) => { const depVersion = packageJson.dependencies[depFullName]; if (depVersion) { console.log( - `${packageName}'s dependency ${depName} ${depVersion} -> ${versionToBump}` + `${packageName}'s dependency ${depName} ${depVersion} -> ${versionToBump}`, ); packageJson.dependencies[depFullName] = versionToBump; } @@ -196,7 +196,7 @@ const bumpExtensionPackage = (packageName, versionToBump) => { REPO_DIR, 'packages', packageName, - 'package.json' + 'package.json', ); const packageJson = readJson(packageJsonPath); @@ -220,7 +220,7 @@ const gitAdd = () => { ['add', 'packages/*/package.json', 'example-apps/*/package.json'], { stdio: [0, 1, 2], - } + }, ); if (result.status !== 0) { @@ -258,7 +258,7 @@ const gitTag = (versionsToBump) => { } return result; }, - {} + {}, ); Object.keys(toVersions).map((packageName) => { @@ -312,15 +312,15 @@ const main = async () => { console.error(err.message); console.error( `Now you may have to use ${bold.underline('git restore')} and ` + - `${bold.underline('git tag -d')} to roll back the changes.` + `${bold.underline('git tag -d')} to roll back the changes.`, ); return 1; } console.log( `\nDone! Review the change with ${bold.underline( - 'git diff HEAD~1..HEAD' - )} then ${bold.underline('git push origin HEAD --tags')}.` + 'git diff HEAD~1..HEAD', + )} then ${bold.underline('git push origin HEAD --tags')}.`, ); return 0; }; diff --git a/yarn.lock b/yarn.lock index 85bcb18c7..ef49c4978 100644 --- a/yarn.lock +++ b/yarn.lock @@ -88,16 +88,16 @@ tslib "^2.6.2" "@aws-sdk/client-cloudfront@^3.687.0": - version "3.698.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-cloudfront/-/client-cloudfront-3.698.0.tgz#dbad5e677a5423390c23370ade7fcdedb7b54739" - integrity sha512-u2sZ8gaitX5h503gxlxYWjhtUGVkd41nT0IymJ7pBw3HIH2v+r7i+p53+krKwf/nv/z2CNg8FtVUQqXX25FH6w== + version "3.699.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-cloudfront/-/client-cloudfront-3.699.0.tgz#0dddf47efd611377637d2e718481ce9f2b68a51b" + integrity sha512-0tHdtyJ9xmlNsfZppYEflrtskxZjbwPCD4DzcFXRxXEteDtZhRshF1YGAEYUZ7Iad4ps+XbQOEiAJmWW+G2QFw== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.696.0" - "@aws-sdk/client-sts" "3.696.0" + "@aws-sdk/client-sso-oidc" "3.699.0" + "@aws-sdk/client-sts" "3.699.0" "@aws-sdk/core" "3.696.0" - "@aws-sdk/credential-provider-node" "3.696.0" + "@aws-sdk/credential-provider-node" "3.699.0" "@aws-sdk/middleware-host-header" "3.696.0" "@aws-sdk/middleware-logger" "3.696.0" "@aws-sdk/middleware-recursion-detection" "3.696.0" @@ -138,9 +138,9 @@ tslib "^2.6.2" "@aws-sdk/client-s3@^3.701.0": - version "3.703.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-s3/-/client-s3-3.703.0.tgz#5ca20c606e13ca751ef972c82bb8ef27095db083" - integrity sha512-4TSrIamzASTeRPKXrTLcEwo+viPTuOSGcbXh4HC1R0m/rXwK0BHJ4btJ0Q34nZNF+WzvM+FiemXVjNc8qTAxog== + version "3.705.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-s3/-/client-s3-3.705.0.tgz#7a4a4784bd5b3ca3187ff876b771eaf0cbde1c42" + integrity sha512-Fm0Cbc4zr0yG0DnNycz7ywlL5tQFdLSb7xCIPfzrxJb3YQiTXWxH5eu61SSsP/Z6RBNRolmRPvst/iNgX0fWvA== dependencies: "@aws-crypto/sha1-browser" "5.2.0" "@aws-crypto/sha256-browser" "5.2.0" @@ -201,51 +201,6 @@ "@smithy/util-waiter" "^3.1.9" tslib "^2.6.2" -"@aws-sdk/client-sso-oidc@3.696.0": - version "3.696.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.696.0.tgz#b6a92ae876d3fdaa986bd70bbb329dcbcd12ea2b" - integrity sha512-ikxQ3mo86d1mAq5zTaQAh8rLBERwL+I4MUYu/IVYW2hhl9J2SDsl0SgnKeXQG6S8zWuHcBO587zsZaRta1MQ/g== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.696.0" - "@aws-sdk/credential-provider-node" "3.696.0" - "@aws-sdk/middleware-host-header" "3.696.0" - "@aws-sdk/middleware-logger" "3.696.0" - "@aws-sdk/middleware-recursion-detection" "3.696.0" - "@aws-sdk/middleware-user-agent" "3.696.0" - "@aws-sdk/region-config-resolver" "3.696.0" - "@aws-sdk/types" "3.696.0" - "@aws-sdk/util-endpoints" "3.696.0" - "@aws-sdk/util-user-agent-browser" "3.696.0" - "@aws-sdk/util-user-agent-node" "3.696.0" - "@smithy/config-resolver" "^3.0.12" - "@smithy/core" "^2.5.3" - "@smithy/fetch-http-handler" "^4.1.1" - "@smithy/hash-node" "^3.0.10" - "@smithy/invalid-dependency" "^3.0.10" - "@smithy/middleware-content-length" "^3.0.12" - "@smithy/middleware-endpoint" "^3.2.3" - "@smithy/middleware-retry" "^3.0.27" - "@smithy/middleware-serde" "^3.0.10" - "@smithy/middleware-stack" "^3.0.10" - "@smithy/node-config-provider" "^3.1.11" - "@smithy/node-http-handler" "^3.3.1" - "@smithy/protocol-http" "^4.1.7" - "@smithy/smithy-client" "^3.4.4" - "@smithy/types" "^3.7.1" - "@smithy/url-parser" "^3.0.10" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.27" - "@smithy/util-defaults-mode-node" "^3.0.27" - "@smithy/util-endpoints" "^2.1.6" - "@smithy/util-middleware" "^3.0.10" - "@smithy/util-retry" "^3.0.10" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - "@aws-sdk/client-sso-oidc@3.699.0": version "3.699.0" resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.699.0.tgz#a35665e681abd518b56330bc7dab63041fbdaf83" @@ -335,52 +290,6 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sts@3.696.0": - version "3.696.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.696.0.tgz#58d820a6d6f62626fd3177e7c0dc90027f0c6c3c" - integrity sha512-eJOxR8/UyI7kGSRyE751Ea7MKEzllQs7eNveDJy9OP4t/jsN/P19HJ1YHeA1np40JRTUBfqa6WLAAiIXsk8rkg== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.696.0" - "@aws-sdk/core" "3.696.0" - "@aws-sdk/credential-provider-node" "3.696.0" - "@aws-sdk/middleware-host-header" "3.696.0" - "@aws-sdk/middleware-logger" "3.696.0" - "@aws-sdk/middleware-recursion-detection" "3.696.0" - "@aws-sdk/middleware-user-agent" "3.696.0" - "@aws-sdk/region-config-resolver" "3.696.0" - "@aws-sdk/types" "3.696.0" - "@aws-sdk/util-endpoints" "3.696.0" - "@aws-sdk/util-user-agent-browser" "3.696.0" - "@aws-sdk/util-user-agent-node" "3.696.0" - "@smithy/config-resolver" "^3.0.12" - "@smithy/core" "^2.5.3" - "@smithy/fetch-http-handler" "^4.1.1" - "@smithy/hash-node" "^3.0.10" - "@smithy/invalid-dependency" "^3.0.10" - "@smithy/middleware-content-length" "^3.0.12" - "@smithy/middleware-endpoint" "^3.2.3" - "@smithy/middleware-retry" "^3.0.27" - "@smithy/middleware-serde" "^3.0.10" - "@smithy/middleware-stack" "^3.0.10" - "@smithy/node-config-provider" "^3.1.11" - "@smithy/node-http-handler" "^3.3.1" - "@smithy/protocol-http" "^4.1.7" - "@smithy/smithy-client" "^3.4.4" - "@smithy/types" "^3.7.1" - "@smithy/url-parser" "^3.0.10" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.27" - "@smithy/util-defaults-mode-node" "^3.0.27" - "@smithy/util-endpoints" "^2.1.6" - "@smithy/util-middleware" "^3.0.10" - "@smithy/util-retry" "^3.0.10" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - "@aws-sdk/client-sts@3.699.0": version "3.699.0" resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.699.0.tgz#9419be6bbf3809008128117afea8b9129b5a959d" @@ -471,24 +380,6 @@ "@smithy/util-stream" "^3.3.1" tslib "^2.6.2" -"@aws-sdk/credential-provider-ini@3.696.0": - version "3.696.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.696.0.tgz#8b162db836c81582f249e24adff48f01cacca402" - integrity sha512-9WsZZofjPjNAAZhIh7c7FOhLK8CR3RnGgUm1tdZzV6ZSM1BuS2m6rdwIilRxAh3fxxKDkmW/r/aYmmCYwA+AYA== - dependencies: - "@aws-sdk/core" "3.696.0" - "@aws-sdk/credential-provider-env" "3.696.0" - "@aws-sdk/credential-provider-http" "3.696.0" - "@aws-sdk/credential-provider-process" "3.696.0" - "@aws-sdk/credential-provider-sso" "3.696.0" - "@aws-sdk/credential-provider-web-identity" "3.696.0" - "@aws-sdk/types" "3.696.0" - "@smithy/credential-provider-imds" "^3.2.6" - "@smithy/property-provider" "^3.1.9" - "@smithy/shared-ini-file-loader" "^3.1.10" - "@smithy/types" "^3.7.1" - tslib "^2.6.2" - "@aws-sdk/credential-provider-ini@3.699.0": version "3.699.0" resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.699.0.tgz#7919a454b05c5446d04a0d3270807046a029ee30" @@ -507,24 +398,6 @@ "@smithy/types" "^3.7.1" tslib "^2.6.2" -"@aws-sdk/credential-provider-node@3.696.0": - version "3.696.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.696.0.tgz#6d8d97a85444bfd3c5a1aded9ce894f68e6d3547" - integrity sha512-8F6y5FcfRuMJouC5s207Ko1mcVvOXReBOlJmhIwE4QH1CnO/CliIyepnAZrRQ659mo5wIuquz6gXnpYbitEVMg== - dependencies: - "@aws-sdk/credential-provider-env" "3.696.0" - "@aws-sdk/credential-provider-http" "3.696.0" - "@aws-sdk/credential-provider-ini" "3.696.0" - "@aws-sdk/credential-provider-process" "3.696.0" - "@aws-sdk/credential-provider-sso" "3.696.0" - "@aws-sdk/credential-provider-web-identity" "3.696.0" - "@aws-sdk/types" "3.696.0" - "@smithy/credential-provider-imds" "^3.2.6" - "@smithy/property-provider" "^3.1.9" - "@smithy/shared-ini-file-loader" "^3.1.10" - "@smithy/types" "^3.7.1" - tslib "^2.6.2" - "@aws-sdk/credential-provider-node@3.699.0": version "3.699.0" resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.699.0.tgz#6a1e32a49a7fa71d10c85a927267d1782444def1" @@ -555,20 +428,6 @@ "@smithy/types" "^3.7.1" tslib "^2.6.2" -"@aws-sdk/credential-provider-sso@3.696.0": - version "3.696.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.696.0.tgz#3e58608e7c330e08206af496a14764f82a776acf" - integrity sha512-4SSZ9Nk08JSu4/rX1a+dEac/Ims1HCXfV7YLUe5LGdtRLSKRoQQUy+hkFaGYoSugP/p1UfUPl3BuTO9Vv8z1pA== - dependencies: - "@aws-sdk/client-sso" "3.696.0" - "@aws-sdk/core" "3.696.0" - "@aws-sdk/token-providers" "3.696.0" - "@aws-sdk/types" "3.696.0" - "@smithy/property-provider" "^3.1.9" - "@smithy/shared-ini-file-loader" "^3.1.10" - "@smithy/types" "^3.7.1" - tslib "^2.6.2" - "@aws-sdk/credential-provider-sso@3.699.0": version "3.699.0" resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.699.0.tgz#515e2ecd407bace3141b8b192505631de415667e" @@ -740,17 +599,6 @@ "@smithy/types" "^3.7.1" tslib "^2.6.2" -"@aws-sdk/token-providers@3.696.0": - version "3.696.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.696.0.tgz#22ca7cf0901885d2f01aed6fe664e5162ae58108" - integrity sha512-fvTcMADrkwRdNwVmJXi2pSPf1iizmUqczrR1KusH4XehI/KybS4U6ViskRT0v07vpxwL7x+iaD/8fR0PUu5L/g== - dependencies: - "@aws-sdk/types" "3.696.0" - "@smithy/property-provider" "^3.1.9" - "@smithy/shared-ini-file-loader" "^3.1.10" - "@smithy/types" "^3.7.1" - tslib "^2.6.2" - "@aws-sdk/token-providers@3.699.0": version "3.699.0" resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.699.0.tgz#354990dd52d651c1f7a64c4c0894c868cdc81de2" @@ -823,7 +671,7 @@ "@smithy/types" "^3.7.1" tslib "^2.6.2" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== @@ -833,9 +681,9 @@ picocolors "^1.0.0" "@babel/compat-data@^7.25.9": - version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.2.tgz#278b6b13664557de95b8f35b90d96785850bb56e" - integrity sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02" + integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== "@babel/core@^7.24.7": version "7.26.0" @@ -858,13 +706,13 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.9", "@babel/generator@^7.26.0": - version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.2.tgz#87b75813bec87916210e5e01939a4c823d6bb74f" - integrity sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw== +"@babel/generator@^7.26.0", "@babel/generator@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" + integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== dependencies: - "@babel/parser" "^7.26.2" - "@babel/types" "^7.26.0" + "@babel/parser" "^7.26.3" + "@babel/types" "^7.26.3" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" @@ -916,7 +764,7 @@ "@babel/traverse" "^7.25.9" "@babel/types" "^7.25.9" -"@babel/helper-module-transforms@^7.25.9", "@babel/helper-module-transforms@^7.26.0": +"@babel/helper-module-transforms@^7.26.0": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== @@ -946,14 +794,6 @@ "@babel/helper-optimise-call-expression" "^7.25.9" "@babel/traverse" "^7.25.9" -"@babel/helper-simple-access@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.25.9.tgz#6d51783299884a2c74618d6ef0f86820ec2e7739" - integrity sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q== - dependencies: - "@babel/traverse" "^7.25.9" - "@babel/types" "^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz#0b2e1b62d560d6b1954893fd2b705dc17c91f0c9" @@ -985,12 +825,12 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.24.7", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.2": - version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.2.tgz#fd7b6f487cfea09889557ef5d4eeb9ff9a5abd11" - integrity sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ== +"@babel/parser@^7.24.7", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" + integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== dependencies: - "@babel/types" "^7.26.0" + "@babel/types" "^7.26.3" "@babel/plugin-syntax-flow@^7.25.9": version "7.26.0" @@ -1030,13 +870,12 @@ "@babel/plugin-syntax-flow" "^7.25.9" "@babel/plugin-transform-modules-commonjs@^7.24.7", "@babel/plugin-transform-modules-commonjs@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.9.tgz#d165c8c569a080baf5467bda88df6425fc060686" - integrity sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz#8f011d44b20d02c3de44d8850d971d8497f981fb" + integrity sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ== dependencies: - "@babel/helper-module-transforms" "^7.25.9" + "@babel/helper-module-transforms" "^7.26.0" "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-simple-access" "^7.25.9" "@babel/plugin-transform-nullish-coalescing-operator@^7.24.7": version "7.25.9" @@ -1062,9 +901,9 @@ "@babel/helper-plugin-utils" "^7.25.9" "@babel/plugin-transform-typescript@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.9.tgz#69267905c2b33c2ac6d8fe765e9dc2ddc9df3849" - integrity sha512-7PbZQZP50tzv2KGGnhh82GSyMB01yKY9scIjf1a+GfZCtInOWqUH5+1EBU4t9fyR5Oykkkc9vFTs4OHrhHXljQ== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.26.3.tgz#3d6add9c78735623317387ee26d5ada540eee3fd" + integrity sha512-6+5hpdr6mETwSKjmJUdYw0EIkATiQhnELWlE3kJFBwSg/BGIVwVaVbX+gOXBCdc7Ln1RXZxyWGecIXhUfnl7oA== dependencies: "@babel/helper-annotate-as-pure" "^7.25.9" "@babel/helper-create-class-features-plugin" "^7.25.9" @@ -1113,22 +952,22 @@ "@babel/types" "^7.25.9" "@babel/traverse@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.9.tgz#a50f8fe49e7f69f53de5bea7e413cd35c5e13c84" - integrity sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.3.tgz#1ebfc75bd748d8f96b3cc63af5e82ebd4c37ba35" + integrity sha512-yTmc8J+Sj8yLzwr4PD5Xb/WF3bOYu2C2OoSZPzbuqRm4n98XirsbzaX+GloeO376UnSYIYJ4NCanwV5/ugZkwA== dependencies: - "@babel/code-frame" "^7.25.9" - "@babel/generator" "^7.25.9" - "@babel/parser" "^7.25.9" + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.3" + "@babel/parser" "^7.26.3" "@babel/template" "^7.25.9" - "@babel/types" "^7.25.9" + "@babel/types" "^7.26.3" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.25.9", "@babel/types@^7.26.0": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.0.tgz#deabd08d6b753bc8e0f198f8709fb575e31774ff" - integrity sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA== +"@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" + integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -1275,61 +1114,96 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0", "@eslint-community/eslint-utils@^4.4.1": version "4.4.1" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== dependencies: eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.11.0", "@eslint-community/regexpp@^4.12.1": version "4.12.1" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== +"@eslint/config-array@^0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.0.tgz#3251a528998de914d59bb21ba4c11767cf1b3519" + integrity sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.0.tgz#168ee076f94b152c01ca416c3e5cf82290ab4fcd" + integrity sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg== + +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.1": - version "8.57.1" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" - integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== +"@eslint/js@9.16.0", "@eslint/js@^9.16.0": + version "9.16.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4" + integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + +"@eslint/plugin-kit@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz#812980a6a41ecf3a8341719f92a6d1e784a2e0e8" + integrity sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA== + dependencies: + levn "^0.4.1" "@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== "@hutson/parse-repository-url@^3.0.0": version "3.0.2" @@ -1688,7 +1562,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -2108,7 +1982,7 @@ resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.1.4.tgz#e3e3f4d017c8e2ad22e957c55921cf01ba66fc11" integrity sha512-s3RwOkkWKzOflbTmc5MRc4EH2mk1AkJ/V8Gu3Qi2QncF9r1GrR7hDxROpu0MEoHfIhRG+d+n8OGX31nC9GZWUg== -"@oclif/core@4.0.34": +"@oclif/core@4.0.34", "@oclif/core@^4", "@oclif/core@^4.0.32": version "4.0.34" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.0.34.tgz#2a1d10e6383383cae5fb81662d68147cc6a0dcef" integrity sha512-jHww7lIqyifamynDSjDNNjNOwFTQdKYeOSYaxUaoWhqXnRwacZ+pfUN4Y0L9lqSN4MQtlWM9mwnBD7FvlT9kPw== @@ -2132,30 +2006,6 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" -"@oclif/core@^4", "@oclif/core@^4.0.32": - version "4.0.33" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.0.33.tgz#fcaf3dd2850c5999de20459a1445d31a230cd24b" - integrity sha512-NoTDwJ2L/ywpsSjcN7jAAHf3m70Px4Yim2SJrm16r70XpnfbNOdlj1x0HEJ0t95gfD+p/y5uy+qPT/VXTh/1gw== - dependencies: - ansi-escapes "^4.3.2" - ansis "^3.3.2" - clean-stack "^3.0.1" - cli-spinners "^2.9.2" - debug "^4.3.7" - ejs "^3.1.10" - get-package-type "^0.1.0" - globby "^11.1.0" - indent-string "^4.0.0" - is-wsl "^2.2.0" - lilconfig "^3.1.2" - minimatch "^9.0.5" - semver "^7.6.3" - string-width "^4.2.3" - supports-color "^8" - widest-line "^3.1.0" - wordwrap "^1.0.0" - wrap-ansi "^7.0.0" - "@oclif/plugin-autocomplete@3.2.11": version "3.2.11" resolved "https://registry.yarnpkg.com/@oclif/plugin-autocomplete/-/plugin-autocomplete-3.2.11.tgz#7737142ad5205e5391f4438deb05a603e3e5db1b" @@ -2173,7 +2023,7 @@ dependencies: "@oclif/core" "^4" -"@oclif/plugin-not-found@3.2.29": +"@oclif/plugin-not-found@3.2.29", "@oclif/plugin-not-found@^3.2.25": version "3.2.29" resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-3.2.29.tgz#fb251743764ada84bd22df6abbc6800a479cd0b6" integrity sha512-TOS46arY8+YK30ks+mvLXwLq4YElMygXKsb8VPdYxUTvbn3yS9fpZ+4IjBo/IM4sZ88D51iXkNZFWt/nItT1Sg== @@ -2183,16 +2033,6 @@ ansis "^3.3.1" fast-levenshtein "^3.0.0" -"@oclif/plugin-not-found@^3.2.25": - version "3.2.28" - resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-3.2.28.tgz#c0cb47b4482e604b51fe270d6f757bb78c5c68a7" - integrity sha512-ObkesXE8F4Hj/AzOCQGI39hqDqm+MfaqY5ByG77uhSkMI4dMaDcPjXZSj1Ftn2mkhZiRk70YN3wTCG4HO/8gqw== - dependencies: - "@inquirer/prompts" "^7.1.0" - "@oclif/core" "^4" - ansis "^3.3.1" - fast-levenshtein "^3.0.0" - "@oclif/plugin-version@2.2.16": version "2.2.16" resolved "https://registry.yarnpkg.com/@oclif/plugin-version/-/plugin-version-2.2.16.tgz#7799455bad42c3b86998efe57c1d711082b9558e" @@ -2202,16 +2042,16 @@ ansis "^3.3.1" "@oclif/plugin-warn-if-update-available@^3.1.21": - version "3.1.23" - resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-3.1.23.tgz#443b8d1d6f9303fadad1241815167f4e0c706ff9" - integrity sha512-0R15OCkpWktUsEdfVNvOIY078rE92Dkor2mB/F2/xW0/VEe3NQEVtiXMatpwYsjc4KKIiWtAVm2P0oQhEbodkg== + version "3.1.24" + resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-3.1.24.tgz#d31340b7a5198bbe99633138e7675e79e6537435" + integrity sha512-VXlVCJO+Pmv5r4FM7ZA3fp8NkYpaySW1CO3DubQOehpPzjNhRuAFz9xngl9CI5Huh/4exUuwm2JmcJ6+EauKSg== dependencies: "@oclif/core" "^4" ansis "^3.3.1" debug "^4.3.5" http-call "^5.2.2" lodash "^4.17.21" - registry-auth-token "^5.0.2" + registry-auth-token "^5.0.3" "@oclif/test@^4.0.9": version "4.1.2" @@ -2459,95 +2299,95 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@rollup/rollup-android-arm-eabi@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.3.tgz#ab2c78c43e4397fba9a80ea93907de7a144f3149" - integrity sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ== - -"@rollup/rollup-android-arm64@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.3.tgz#de840660ab65cf73bd6d4bc62d38acd9fc94cd6c" - integrity sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw== - -"@rollup/rollup-darwin-arm64@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.3.tgz#8c786e388f7eff0d830151a9d8fbf04c031bb07f" - integrity sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA== - -"@rollup/rollup-darwin-x64@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.3.tgz#56dab9e4cac0ad97741740ea1ac7b6a576e20e59" - integrity sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg== - -"@rollup/rollup-freebsd-arm64@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.3.tgz#bcb4112cb7e68a12d148b03cbc21dde43772f4bc" - integrity sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw== - -"@rollup/rollup-freebsd-x64@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.3.tgz#c7cd9f69aa43847b37d819f12c2ad6337ec245fa" - integrity sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA== - -"@rollup/rollup-linux-arm-gnueabihf@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.3.tgz#3692b22987a6195c8490bbf6357800e0c183ee38" - integrity sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q== - -"@rollup/rollup-linux-arm-musleabihf@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.3.tgz#f920f24e571f26bbcdb882267086942fdb2474bf" - integrity sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg== - -"@rollup/rollup-linux-arm64-gnu@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.3.tgz#2046553e91d8ca73359a2a3bb471826fbbdcc9a3" - integrity sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ== - -"@rollup/rollup-linux-arm64-musl@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.3.tgz#8a3f05dbae753102ae10a9bc2168c7b6bbeea5da" - integrity sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g== - -"@rollup/rollup-linux-powerpc64le-gnu@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.3.tgz#d281d9c762f9e4f1aa7909a313f7acbe78aced32" - integrity sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw== - -"@rollup/rollup-linux-riscv64-gnu@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.3.tgz#fa84b3f81826cee0de9e90f9954f3e55c3cc6c97" - integrity sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A== - -"@rollup/rollup-linux-s390x-gnu@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.3.tgz#6b9c04d84593836f942ceb4dd90644633d5fe871" - integrity sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA== - -"@rollup/rollup-linux-x64-gnu@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.3.tgz#f13effcdcd1cc14b26427e6bec8c6c9e4de3773e" - integrity sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA== - -"@rollup/rollup-linux-x64-musl@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.3.tgz#6547bc0069f2d788e6cf0f33363b951181f4cca5" - integrity sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ== - -"@rollup/rollup-win32-arm64-msvc@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.3.tgz#3f2db9347c5df5e6627a7e12d937cea527d63526" - integrity sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw== - -"@rollup/rollup-win32-ia32-msvc@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.3.tgz#54fcf9a13a98d3f0e4be6a4b6e28b9dca676502f" - integrity sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w== - -"@rollup/rollup-win32-x64-msvc@4.27.3": - version "4.27.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.3.tgz#3721f601f973059bfeeb572992cf0dfc94ab2970" - integrity sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg== +"@rollup/rollup-android-arm-eabi@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.0.tgz#462e7ecdd60968bc9eb95a20d185e74f8243ec1b" + integrity sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ== + +"@rollup/rollup-android-arm64@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.0.tgz#78a2b8a8a55f71a295eb860a654ae90a2b168f40" + integrity sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA== + +"@rollup/rollup-darwin-arm64@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.0.tgz#5b783af714f434f1e66e3cdfa3817e0b99216d84" + integrity sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q== + +"@rollup/rollup-darwin-x64@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.0.tgz#f72484e842521a5261978034e18e20f778a2850d" + integrity sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w== + +"@rollup/rollup-freebsd-arm64@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.0.tgz#3c919dff72b2fe344811a609c674a8347b033f62" + integrity sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ== + +"@rollup/rollup-freebsd-x64@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.0.tgz#b62a3a8365b363b3fdfa6da11a9188b6ab4dca7c" + integrity sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA== + +"@rollup/rollup-linux-arm-gnueabihf@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.0.tgz#0d02cc55bd229bd8ca5c54f65f916ba5e0591c94" + integrity sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w== + +"@rollup/rollup-linux-arm-musleabihf@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.0.tgz#c51d379263201e88a60e92bd8e90878f0c044425" + integrity sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg== + +"@rollup/rollup-linux-arm64-gnu@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.0.tgz#93ce2addc337b5cfa52b84f8e730d2e36eb4339b" + integrity sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg== + +"@rollup/rollup-linux-arm64-musl@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.0.tgz#730af6ddc091a5ba5baac28a3510691725dc808b" + integrity sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw== + +"@rollup/rollup-linux-powerpc64le-gnu@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.0.tgz#b5565aac20b4de60ca1e557f525e76478b5436af" + integrity sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ== + +"@rollup/rollup-linux-riscv64-gnu@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.0.tgz#d488290bf9338bad4ae9409c4aa8a1728835a20b" + integrity sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g== + +"@rollup/rollup-linux-s390x-gnu@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.0.tgz#eb2e3f3a06acf448115045c11a5a96868c95a556" + integrity sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw== + +"@rollup/rollup-linux-x64-gnu@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.0.tgz#065952ef2aea7e837dc7e02aa500feeaff4fc507" + integrity sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw== + +"@rollup/rollup-linux-x64-musl@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.0.tgz#3435d484d05f5c4d1ffd54541b4facce2887103a" + integrity sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw== + +"@rollup/rollup-win32-arm64-msvc@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.0.tgz#69682a2a10d9fedc334f87583cfca83c39c08077" + integrity sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg== + +"@rollup/rollup-win32-ia32-msvc@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.0.tgz#b64470f9ac79abb386829c56750b9a4711be3332" + integrity sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A== + +"@rollup/rollup-win32-x64-msvc@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.0.tgz#cb313feef9ac6e3737067fdf34f42804ac65a6f2" + integrity sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -3209,7 +3049,7 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*", "@types/estree@1.0.6", "@types/estree@^1.0.0": +"@types/estree@*", "@types/estree@1.0.6", "@types/estree@^1.0.0", "@types/estree@^1.0.6": version "1.0.6" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== @@ -3278,11 +3118,11 @@ form-data "^4.0.0" "@types/node@*", "@types/node@^22.5.5": - version "22.9.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.1.tgz#bdf91c36e0e7ecfb7257b2d75bf1b206b308ca71" - integrity sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg== + version "22.10.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.1.tgz#41ffeee127b8975a05f8c4f83fb89bcb2987d766" + integrity sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ== dependencies: - undici-types "~6.19.8" + undici-types "~6.20.0" "@types/node@^15.6.2": version "15.14.9" @@ -3290,9 +3130,9 @@ integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A== "@types/node@^20.14.10", "@types/node@^20.3.1": - version "20.17.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.6.tgz#6e4073230c180d3579e8c60141f99efdf5df0081" - integrity sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ== + version "20.17.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.9.tgz#5f141d4b7ee125cdee5faefe28de095398865bab" + integrity sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw== dependencies: undici-types "~6.19.2" @@ -3319,11 +3159,6 @@ resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd" integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g== -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - "@vitest/expect@1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.6.0.tgz#0b3ba0914f738508464983f4d811bc122b51fb30" @@ -3474,7 +3309,7 @@ acorn@^7.0.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.11.0, acorn@^8.14.0, acorn@^8.9.0: +acorn@^8.11.0, acorn@^8.14.0: version "8.14.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== @@ -3926,9 +3761,9 @@ aws4@^1.8.0: integrity sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw== axios@^1.7.4: - version "1.7.8" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.8.tgz#1997b1496b394c21953e68c14aaa51b7b5de3d6e" - integrity sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw== + version "1.7.9" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" + integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -4313,13 +4148,6 @@ builtins@^1.0.3: resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== -builtins@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.1.0.tgz#6d85eeb360c4ebc166c3fdef922a15aa7316a5e8" - integrity sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg== - dependencies: - semver "^7.0.0" - bundle-name@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" @@ -4501,9 +4329,9 @@ camelcase@^6.0.0, camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001669: - version "1.0.30001683" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz#7f026a2d5d319a9cf8915a1451173052caaadc81" - integrity sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q== + version "1.0.30001686" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz#0e04b8d90de8753188e93c9989d56cb19d902670" + integrity sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA== capital-case@^1.0.4: version "1.0.4" @@ -4631,9 +4459,9 @@ ci-info@^4.0.0: integrity sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.5.tgz#749f80731c7821e9a5fabd51f6998b696f296686" - integrity sha512-xq7ICKB4TMHUx7Tz1L9O2SGKOhYMOTR32oir45Bq28/AQTpHogKgHcoYFSdRbMtddl+ozNXfXY9jWcgYKmde0w== + version "1.0.6" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.6.tgz#8fe672437d01cd6c4561af5334e0cc50ff1955f7" + integrity sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw== dependencies: inherits "^2.0.4" safe-buffer "^5.2.1" @@ -5178,7 +5006,7 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.5: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -5603,13 +5431,6 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dom-serializer@0: version "0.2.2" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" @@ -5676,9 +5497,9 @@ dotenv@16.4.6: integrity sha512-JhcR/+KIjkkjiU8yEpaB/USlzVi3i5whwOjpIRNGi9svKEXZSe+Qp6IWAjFjv+2GViAoDRCUv/QLNziQxsLqDg== dotenv@^16.4.5, dotenv@~16.4.5: - version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" - integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + version "16.4.7" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" + integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: version "0.1.4" @@ -5718,9 +5539,9 @@ ejs@^3.1.10, ejs@^3.1.7, ejs@^3.1.8: jake "^10.8.5" electron-to-chromium@^1.5.41: - version "1.5.64" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.64.tgz#ac8c4c89075d35a1514b620f47dfe48a71ec3697" - integrity sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ== + version "1.5.68" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.68.tgz#4f46be4d465ef00e2100d5557b66f4af70e3ce6c" + integrity sha512-FgMdJlma0OzUYlbrtZ4AeXjKxKPk6KT8WOP8BjcqxWtlg8qyJQjRzPJzUtUn5GBg1oQ26hFs7HOOHJMYiJRnvQ== elliptic@^6.5.3, elliptic@^6.5.5: version "6.6.1" @@ -5764,6 +5585,14 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" +enhanced-resolve@^5.17.1: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enquirer@^2.3.6: version "2.4.1" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" @@ -5821,7 +5650,7 @@ error@^10.4.0: resolved "https://registry.yarnpkg.com/error/-/error-10.4.0.tgz#6fcf0fd64bceb1e750f8ed9a3dd880f00e46a487" integrity sha512-YxIFEJuhgcICugOUvRx5th0UM+ActZ9sjY0QJmeVwsQdvosZ7kYzc9QqS0Da3R5iUmgU5meGIxh0xBeZpMVeLw== -es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2: +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2, es-abstract@^1.23.5: version "1.23.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.5.tgz#f4599a4946d57ed467515ed10e4f157289cd52fb" integrity sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ== @@ -5909,13 +5738,13 @@ es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: hasown "^2.0.0" es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18" + integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g== dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" + is-callable "^1.2.7" + is-date-object "^1.0.5" + is-symbol "^1.0.4" es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14, es5-ext@~0.10.2: version "0.10.64" @@ -6027,10 +5856,17 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^8.6.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== +eslint-compat-utils@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz#7fc92b776d185a70c4070d03fd26fde3d59652e4" + integrity sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q== + dependencies: + semver "^7.5.4" + +eslint-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== eslint-config-standard@^17.0.0: version "17.1.0" @@ -6067,15 +5903,16 @@ eslint-module-utils@^2.12.0: dependencies: debug "^3.2.7" -eslint-plugin-es@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" - integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== +eslint-plugin-es-x@^7.8.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz#a207aa08da37a7923f2a9599e6d3eb73f3f92b74" + integrity sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ== dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" + "@eslint-community/eslint-utils" "^4.1.2" + "@eslint-community/regexpp" "^4.11.0" + eslint-compat-utils "^0.5.1" -eslint-plugin-import@^2.27.5: +eslint-plugin-import@^2.31.0: version "2.31.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz#310ce7e720ca1d9c0bb3f69adfd1c6bdd7d9e0e7" integrity sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A== @@ -6100,58 +5937,49 @@ eslint-plugin-import@^2.27.5: string.prototype.trimend "^1.0.8" tsconfig-paths "^3.15.0" -eslint-plugin-mocha@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-9.0.0.tgz#b4457d066941eecb070dc06ed301c527d9c61b60" - integrity sha512-d7knAcQj1jPCzZf3caeBIn3BnW6ikcvfz0kSqQpwPYcVGLoJV5sz0l0OJB2LR8I7dvTDbqq1oV6ylhSgzA10zg== +eslint-plugin-mocha@^10.5.0: + version "10.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-10.5.0.tgz#0aca8d709e7cddef566e0dc252f6b02e307a2b7e" + integrity sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw== dependencies: eslint-utils "^3.0.0" - ramda "^0.27.1" + globals "^13.24.0" + rambda "^7.4.0" + +eslint-plugin-n@^17.14.0: + version "17.14.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-17.14.0.tgz#162a7c17a7ce7e3834af537bca68ab8b6aa26edc" + integrity sha512-maxPLMEA0rPmRpoOlxEclKng4UpDe+N5BJS4t24I3UKnN109Qcivnfs37KMy84G0af3bxjog5lKctP5ObsvcTA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.1" + enhanced-resolve "^5.17.1" + eslint-plugin-es-x "^7.8.0" + get-tsconfig "^4.8.1" + globals "^15.11.0" + ignore "^5.3.2" + minimatch "^9.0.5" + semver "^7.6.3" -eslint-plugin-n@^15.6.1: - version "15.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz#e29221d8f5174f84d18f2eb94765f2eeea033b90" - integrity sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q== +eslint-plugin-promise@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz#a0652195700aea40b926dc3c74b38e373377bfb0" + integrity sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA== dependencies: - builtins "^5.0.1" - eslint-plugin-es "^4.1.0" - eslint-utils "^3.0.0" - ignore "^5.1.1" - is-core-module "^2.11.0" - minimatch "^3.1.2" - resolve "^1.22.1" - semver "^7.3.8" - -eslint-plugin-promise@^6.1.1: - version "6.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz#acd3fd7d55cead7a10f92cf698f36c0aafcd717a" - integrity sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ== - -eslint-plugin-standard@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz#c43f6925d669f177db46f095ea30be95476b1ee4" - integrity sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg== + "@eslint-community/eslint-utils" "^4.4.0" eslint-rule-docs@^1.1.5: version "1.1.235" resolved "https://registry.yarnpkg.com/eslint-rule-docs/-/eslint-rule-docs-1.1.235.tgz#be6ef1fc3525f17b3c859ae2997fedadc89bfb9b" integrity sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A== -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" @@ -6159,64 +5987,60 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.32.0: - version "8.57.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" - integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint@^9.16.0: + version "9.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6" + integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.1" - "@humanwhocodes/config-array" "^0.13.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.9.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.16.0" + "@eslint/plugin-kit" "^0.2.3" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" + "@humanwhocodes/retry" "^0.4.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.2" + cross-spawn "^7.0.5" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" esniff@^2.0.1: version "2.0.1" @@ -6228,14 +6052,14 @@ esniff@^2.0.1: event-emitter "^0.3.5" type "^2.7.2" -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== +espree@^10.0.1, espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== dependencies: - acorn "^8.9.0" + acorn "^8.14.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" + eslint-visitor-keys "^4.2.0" esprima@2.7.x, esprima@^2.7.1: version "2.7.3" @@ -6247,7 +6071,7 @@ esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.2: +esquery@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== @@ -6526,12 +6350,12 @@ figures@3.2.0, figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" file-type@^3.8.0: version "3.9.0" @@ -6634,14 +6458,13 @@ first-chunk-stream@^2.0.0: dependencies: readable-stream "^2.0.2" -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" + keyv "^4.5.4" flat@5.0.2, flat@^5.0.2: version "5.0.2" @@ -6654,9 +6477,9 @@ flatted@^3.2.9: integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA== flow-parser@0.*: - version "0.254.2" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.254.2.tgz#20991dd73c418cbaf1e7e15ce6e62a4f8d1f1e22" - integrity sha512-18xCQaVdKNCY0TAEhwUdk1HmRdgsPSraWwu0Zifqo5M4Ubi9LjWTAdlfBFb07Os+fQ9TmzxlyZN6OxK0m9xrBw== + version "0.255.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.255.0.tgz#5531951318db50ad760fdc1f150e09a3972785c0" + integrity sha512-7QHV2m2mIMh6yIMaAPOVbyNEW77IARwO69d4DgvfDCjuORiykdMLf7XBjF7Zeov7Cpe1OXJ8sB6/aaCE3xuRBw== follow-redirects@^1.15.6: version "1.15.9" @@ -6841,7 +6664,7 @@ get-func-name@^2.0.1, get-func-name@^2.0.2: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: +get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== @@ -6928,6 +6751,13 @@ get-symbol-description@^1.0.2: es-errors "^1.3.0" get-intrinsic "^1.2.4" +get-tsconfig@^4.8.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== + dependencies: + resolve-pkg-maps "^1.0.0" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -7081,14 +6911,24 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0: +globals@^13.24.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" -globalthis@^1.0.3, globalthis@^1.0.4: +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +globals@^15.11.0, globals@^15.13.0: + version "15.13.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc" + integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g== + +globalthis@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== @@ -7108,12 +6948,12 @@ globby@11.1.0, globby@^11.0.1, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== +gopd@^1.0.1, gopd@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.1.0.tgz#df8f0839c2d48caefc32a025a49294d39606c912" + integrity sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA== dependencies: - get-intrinsic "^1.1.3" + get-intrinsic "^1.2.4" got@^13: version "13.0.0" @@ -7159,11 +6999,6 @@ graceful-fs@4.2.11, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.1 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - gray-matter@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-2.1.1.tgz#3042d9adec2a1ded6a7707a9ed2380f8a17a430e" @@ -7238,7 +7073,7 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -has-bigints@^1.0.1, has-bigints@^1.0.2: +has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== @@ -7261,14 +7096,16 @@ has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: es-define-property "^1.0.0" has-proto@^1.0.1, has-proto@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.1.0.tgz#deb10494cbbe8809bce168a3b961f42969f5ed43" + integrity sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q== + dependencies: + call-bind "^1.0.7" -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: version "1.0.2" @@ -7297,12 +7134,12 @@ hash-base@^3.0.0: safe-buffer "^5.2.0" hash-base@~3.0, hash-base@~3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== + version "3.0.5" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.5.tgz#52480e285395cf7fba17dc4c9e47acdc7f248a8a" + integrity sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + safe-buffer "^5.2.1" hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" @@ -7540,7 +7377,7 @@ ignore@5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -ignore@^5.0.4, ignore@^5.1.1, ignore@^5.2.0: +ignore@^5.0.4, ignore@^5.2.0, ignore@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -7755,12 +7592,12 @@ is-async-function@^2.0.0: dependencies: has-tostringtag "^1.0.0" -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== dependencies: - has-bigints "^1.0.1" + has-bigints "^1.0.2" is-binary-path@~2.1.0: version "2.1.0" @@ -7769,20 +7606,20 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== +is-boolean-object@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.0.tgz#9743641e80a62c094b5941c5bb791d66a88e497a" + integrity sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw== dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" + call-bind "^1.0.7" + has-tostringtag "^1.0.2" is-buffer@^1.1.0, is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: +is-callable@^1.1.3, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== @@ -7801,7 +7638,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.15.1, is-core-module@^2.5.0, is-core-module@^2.8.1: +is-core-module@^2.13.0, is-core-module@^2.15.1, is-core-module@^2.5.0, is-core-module@^2.8.1: version "2.15.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== @@ -7815,7 +7652,7 @@ is-data-view@^1.0.1: dependencies: is-typed-array "^1.1.13" -is-date-object@^1.0.1, is-date-object@^1.0.5: +is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -7849,12 +7686,12 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-finalizationregistry@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz#c8749b65f17c133313e661b1289b95ad3dbd62e6" - integrity sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw== +is-finalizationregistry@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.0.tgz#d74a7d0c5f3578e34a20729e69202e578d495dc2" + integrity sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -7932,12 +7769,13 @@ is-npm@^5.0.0: resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-5.0.0.tgz#43e8d65cc56e1b67f8d47262cf667099193f45a8" integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== +is-number-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.0.tgz#5a867e9ecc3d294dda740d9f127835857af7eb05" + integrity sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw== dependencies: - has-tostringtag "^1.0.0" + call-bind "^1.0.7" + has-tostringtag "^1.0.2" is-number@^2.1.0: version "2.1.0" @@ -7966,7 +7804,7 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-inside@^3.0.2, is-path-inside@^3.0.3: +is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -8004,12 +7842,14 @@ is-promise@^2.2.2: integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.0.tgz#41b9d266e7eb7451312c64efc37e8a7d453077cf" + integrity sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA== dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" + call-bind "^1.0.7" + gopd "^1.1.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" is-regexp@^1.0.0: version "1.0.0" @@ -8074,19 +7914,22 @@ is-stream@^3.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== +is-string@^1.0.7, is-string@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.0.tgz#8cb83c5d57311bf8058bc6c8db294711641da45d" + integrity sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g== dependencies: - has-tostringtag "^1.0.0" + call-bind "^1.0.7" + has-tostringtag "^1.0.2" -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== +is-symbol@^1.0.4, is-symbol@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.0.tgz#ae993830a56d4781886d39f9f0a46b3e89b7b60b" + integrity sha512-qS8KkNNXUZ/I+nX6QT8ZS1/Yx0A444yhzdTKxCzKkNjQ9sHErBxJnJAgh+f5YhusYECEcjo4XcyH87hn6+ks0A== dependencies: - has-symbols "^1.0.2" + call-bind "^1.0.7" + has-symbols "^1.0.3" + safe-regex-test "^1.0.3" is-text-path@^1.0.1: version "1.0.1" @@ -8289,7 +8132,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-tokens@^9.0.0: +js-tokens@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-9.0.1.tgz#2ec43964658435296f6761b34e10671c2d9527f4" integrity sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ== @@ -8513,7 +8356,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -keyv@^4.5.3: +keyv@^4.5.3, keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -8692,9 +8535,9 @@ libnpmpublish@9.0.9: ssri "^10.0.6" lilconfig@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.2.tgz#e4a7c3cb549e3a606c8dcc32e5ae1005e62c05cb" - integrity sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow== + version "3.1.3" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4" + integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== lines-and-columns@2.0.3: version "2.0.3" @@ -8947,9 +8790,9 @@ luxon@3.5.0: integrity sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ== magic-string@^0.30.5: - version "0.30.13" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.13.tgz#92438e3ff4946cf54f18247c981e5c161c46683c" - integrity sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g== + version "0.30.14" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.14.tgz#e9bb29870b81cfc1ec3cc656552f5a7fcbf19077" + integrity sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw== dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" @@ -9288,7 +9131,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -9616,9 +9459,9 @@ mz@^2.4.0: thenify-all "^1.0.0" nanoid@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== natural-compare@^1.4.0: version "1.4.0" @@ -9678,9 +9521,9 @@ node-domexception@^1.0.0: integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== node-emoji@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.1.3.tgz#93cfabb5cc7c3653aa52f29d6ffb7927d8047c06" - integrity sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.2.0.tgz#1d000e3c76e462577895be1b436f4aa2d6760eb0" + integrity sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw== dependencies: "@sindresorhus/is" "^4.6.0" char-regex "^1.0.2" @@ -9711,9 +9554,9 @@ node-fetch@^3.3.2: formdata-polyfill "^4.0.10" node-gyp@^10.0.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.2.0.tgz#80101c4aa4f7ab225f13fcc8daaaac4eb1a8dd86" - integrity sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw== + version "10.3.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.3.1.tgz#1dd1a1a1c6c5c59da1a76aea06a062786b2c8a1a" + integrity sha512-Pp3nFHBThHzVtNY7U6JfPjvT/DTE8+o/4xKsLQtBoU+j2HLsGlhcfzflAoUreaJbNmYnX+LlLi0qjV8kpyO6xQ== dependencies: env-paths "^2.2.0" exponential-backoff "^3.1.1" @@ -10180,9 +10023,9 @@ object.values@^1.2.0: es-object-atoms "^1.0.0" oclif@^4.15.30: - version "4.15.30" - resolved "https://registry.yarnpkg.com/oclif/-/oclif-4.15.30.tgz#82fed751fb610a8966b4bd2785e49ebf80a5e13d" - integrity sha512-FL2vEfmglnNMLyOVNfemYG2KL534AlAi7cFBcD2TWtrQKoHTi7JHe4k9j8TPca6KCqDNvsuhuxP3AClZeHiCcg== + version "4.16.0" + resolved "https://registry.yarnpkg.com/oclif/-/oclif-4.16.0.tgz#bd2e0ec5dc48ed8a2f5dbd7e298727812b7aadb5" + integrity sha512-Y5bcJc4vwhAW0UN9ctZvfLYZz+nC4rQJPmmpKFXLj7A6uKS1c+GrNa4WwZnk9D4eN32kP/awyRRdd2lbX/S+KQ== dependencies: "@aws-sdk/client-cloudfront" "^3.687.0" "@aws-sdk/client-s3" "^3.701.0" @@ -10973,15 +10816,20 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA== -prettier@2.8.8, prettier@^2.0.0, prettier@^2.8.3: +prettier@3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.1.tgz#e211d451d6452db0a291672ca9154bc8c2579f7b" + integrity sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg== + +prettier@^2.0.0: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -prettier@^3.2.5: - version "3.3.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" - integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== +prettier@^3.2.5, prettier@^3.4.1: + version "3.4.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f" + integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ== pretty-bytes@^5.3.0: version "5.6.0" @@ -11088,9 +10936,9 @@ proxy-from-env@^1.1.0: integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== psl@^1.1.28: - version "1.13.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.13.0.tgz#8b2357f13ef3cf546af3f52de00543a94da86cfa" - integrity sha512-BFwmFXiJoFqlUpZ5Qssolv15DMyc84gTBds1BjsV1BfXEo1UyyD7GsmN67n7J77uRhoSNW1AXtXKPLcBFQn9Aw== + version "1.15.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.15.0.tgz#bdace31896f1d97cec6a79e8224898ce93d974c6" + integrity sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w== dependencies: punycode "^2.3.1" @@ -11183,10 +11031,10 @@ quick-lru@^5.1.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== -ramda@^0.27.1: - version "0.27.2" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.2.tgz#84463226f7f36dc33592f6f4ed6374c48306c3f1" - integrity sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA== +rambda@^7.4.0: + version "7.5.0" + resolved "https://registry.yarnpkg.com/rambda/-/rambda-7.5.0.tgz#1865044c59bc0b16f63026c6e5a97e4b1bbe98fe" + integrity sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA== randomatic@^3.0.0: version "3.1.1" @@ -11419,17 +11267,17 @@ redent@^3.0.0: strip-indent "^3.0.0" reflect.getprototypeof@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz#3ab04c32a8390b770712b7a8633972702d278859" - integrity sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg== + version "1.0.7" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.7.tgz#04311b33a1b713ca5eb7b5aed9950a86481858e5" + integrity sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g== dependencies: call-bind "^1.0.7" define-properties "^1.2.1" - es-abstract "^1.23.1" + es-abstract "^1.23.5" es-errors "^1.3.0" get-intrinsic "^1.2.4" - globalthis "^1.0.3" - which-builtin-type "^1.1.3" + gopd "^1.0.1" + which-builtin-type "^1.1.4" regexp.prototype.flags@^1.5.3: version "1.5.3" @@ -11441,11 +11289,6 @@ regexp.prototype.flags@^1.5.3: es-errors "^1.3.0" set-function-name "^2.0.2" -regexpp@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - registry-auth-token@^4.0.0: version "4.2.2" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.2.tgz#f02d49c3668884612ca031419491a13539e21fac" @@ -11453,10 +11296,10 @@ registry-auth-token@^4.0.0: dependencies: rc "1.2.8" -registry-auth-token@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.0.2.tgz#8b026cc507c8552ebbe06724136267e63302f756" - integrity sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ== +registry-auth-token@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.0.3.tgz#417d758c8164569de8cf5cabff16cc937902dcc6" + integrity sha512-1bpc9IyC+e+CNFRaWyn77tk4xGG4PPUyfakSmA6F6cvUDjrm58dfyJ3II+9yb10EDkHoy1LaPSmHaWLOH3m6HA== dependencies: "@pnpm/npm-conf" "^2.1.0" @@ -11548,12 +11391,17 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== -resolve@^1.1.4, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.22.1, resolve@^1.22.4, resolve@^1.4.0: +resolve@^1.1.4, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.22.4, resolve@^1.4.0: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -11627,30 +11475,30 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: inherits "^2.0.1" rollup@^4.20.0: - version "4.27.3" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.27.3.tgz#078ecb20830c1de1f5486607f3e2f490269fb98a" - integrity sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ== + version "4.28.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.28.0.tgz#eb8d28ed43ef60a18f21d0734d230ee79dd0de77" + integrity sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ== dependencies: "@types/estree" "1.0.6" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.27.3" - "@rollup/rollup-android-arm64" "4.27.3" - "@rollup/rollup-darwin-arm64" "4.27.3" - "@rollup/rollup-darwin-x64" "4.27.3" - "@rollup/rollup-freebsd-arm64" "4.27.3" - "@rollup/rollup-freebsd-x64" "4.27.3" - "@rollup/rollup-linux-arm-gnueabihf" "4.27.3" - "@rollup/rollup-linux-arm-musleabihf" "4.27.3" - "@rollup/rollup-linux-arm64-gnu" "4.27.3" - "@rollup/rollup-linux-arm64-musl" "4.27.3" - "@rollup/rollup-linux-powerpc64le-gnu" "4.27.3" - "@rollup/rollup-linux-riscv64-gnu" "4.27.3" - "@rollup/rollup-linux-s390x-gnu" "4.27.3" - "@rollup/rollup-linux-x64-gnu" "4.27.3" - "@rollup/rollup-linux-x64-musl" "4.27.3" - "@rollup/rollup-win32-arm64-msvc" "4.27.3" - "@rollup/rollup-win32-ia32-msvc" "4.27.3" - "@rollup/rollup-win32-x64-msvc" "4.27.3" + "@rollup/rollup-android-arm-eabi" "4.28.0" + "@rollup/rollup-android-arm64" "4.28.0" + "@rollup/rollup-darwin-arm64" "4.28.0" + "@rollup/rollup-darwin-x64" "4.28.0" + "@rollup/rollup-freebsd-arm64" "4.28.0" + "@rollup/rollup-freebsd-x64" "4.28.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.28.0" + "@rollup/rollup-linux-arm-musleabihf" "4.28.0" + "@rollup/rollup-linux-arm64-gnu" "4.28.0" + "@rollup/rollup-linux-arm64-musl" "4.28.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.28.0" + "@rollup/rollup-linux-riscv64-gnu" "4.28.0" + "@rollup/rollup-linux-s390x-gnu" "4.28.0" + "@rollup/rollup-linux-x64-gnu" "4.28.0" + "@rollup/rollup-linux-x64-musl" "4.28.0" + "@rollup/rollup-win32-arm64-msvc" "4.28.0" + "@rollup/rollup-win32-ia32-msvc" "4.28.0" + "@rollup/rollup-win32-x64-msvc" "4.28.0" fsevents "~2.3.2" run-applescript@^7.0.0: @@ -11760,7 +11608,7 @@ semver-diff@^3.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@7.6.3, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.6.0, semver@^7.6.3: +semver@7.6.3, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -11855,9 +11703,9 @@ shebang-regex@^3.0.0: integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shell-quote@^1.6.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" - integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + version "1.8.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.2.tgz#d2d83e057959d53ec261311e9e9b8f51dcb2934a" + integrity sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA== shelljs@^0.8.5: version "0.8.5" @@ -12070,9 +11918,9 @@ sort-object-keys@^1.1.3: integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== sort-package-json@^2.10.1: - version "2.11.0" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-2.11.0.tgz#51d02a1dd739ce42f4274612d1a2e32a8742c1d4" - integrity sha512-pBs3n/wcsbnMSiO5EYV4AVnZVtyQslfZ/0v6VbrRRVApqyNf0Uqo4MOXJsBmIplGY1hYZ4bq5qjO9xTgY+K8xw== + version "2.12.0" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-2.12.0.tgz#4196a1ba82ba63c4a512add1d00ab39026bf8ab7" + integrity sha512-/HrPQAeeLaa+vbAH/znjuhwUluuiM/zL5XX9kop8UpDgjtyWKt43hGDk2vd/TBdDpzIyzIHVUgmYofzYrAQjew== dependencies: detect-indent "^7.0.1" detect-newline "^4.0.0" @@ -12261,9 +12109,9 @@ streamsearch@^1.1.0: integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== streamx@^2.15.0: - version "2.20.2" - resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.20.2.tgz#6a8911959d6f307c19781a1d19ecd94b5f042d78" - integrity sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA== + version "2.21.0" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.21.0.tgz#ef42a3b3fada6887ba06964443adbbbec60c5851" + integrity sha512-Qz6MsDZXJ6ur9u+b+4xCG18TluU7PGlRfXVAAjNiGsFrBUt/ioyLkxbFaKJygoPs+/kW4VyBj0bSj89Qu0IGyg== dependencies: fast-fifo "^1.3.2" queue-tick "^1.0.1" @@ -12439,11 +12287,11 @@ strip-json-comments@~2.0.1: integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== strip-literal@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.1.0.tgz#6d82ade5e2e74f5c7e8739b6c84692bd65f0bd2a" - integrity sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw== + version "2.1.1" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.1.1.tgz#26906e65f606d49f748454a08084e94190c2e5ad" + integrity sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q== dependencies: - js-tokens "^9.0.0" + js-tokens "^9.0.1" strnum@^1.0.5: version "1.0.5" @@ -12527,6 +12375,11 @@ syntax-error@^1.1.1: dependencies: acorn-node "^1.2.0" +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + tar-stream@^1.5.2: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" @@ -12932,16 +12785,16 @@ typed-array-byte-offset@^1.0.2: reflect.getprototypeof "^1.0.6" typed-array-length@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" - integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== dependencies: call-bind "^1.0.7" for-each "^0.3.3" gopd "^1.0.1" - has-proto "^1.0.3" is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" typedarray-to-buffer@^3.1.5: version "3.1.5" @@ -13026,11 +12879,16 @@ underscore@1.4.4: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" integrity sha512-ZqGrAgaqqZM7LGRzNjLnw5elevWb5M8LEoDMadxIW3OWbcv72wMMgKdwOKpd5Fqxe8choLD8HN3iSj3TUh/giQ== -undici-types@~6.19.2, undici-types@~6.19.8: +undici-types@~6.19.2: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + unicode-emoji-modifier-base@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz#dbbd5b54ba30f287e2a8d5a249da6c0cef369459" @@ -13378,26 +13236,27 @@ whatwg-url@^5.0.0: webidl-conversions "^3.0.0" which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + version "1.1.0" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.0.tgz#2d850d6c4ac37b95441a67890e19f3fda8b6c6d9" + integrity sha512-Ei7Miu/AXe2JJ4iNF5j/UphAgRoma4trE6PtisM09bPygb3egMH3YLW/befsWb1A1AxvNSFidOFTB18XtnIIng== dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" + is-bigint "^1.1.0" + is-boolean-object "^1.2.0" + is-number-object "^1.1.0" + is-string "^1.1.0" + is-symbol "^1.1.0" -which-builtin-type@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.4.tgz#592796260602fc3514a1b5ee7fa29319b72380c3" - integrity sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w== +which-builtin-type@^1.1.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.0.tgz#58042ac9602d78a6d117c7e811349df1268ba63c" + integrity sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA== dependencies: + call-bind "^1.0.7" function.prototype.name "^1.1.6" has-tostringtag "^1.0.2" is-async-function "^2.0.0" is-date-object "^1.0.5" - is-finalizationregistry "^1.0.2" + is-finalizationregistry "^1.1.0" is-generator-function "^1.0.10" is-regex "^1.1.4" is-weakref "^1.0.2" @@ -13425,9 +13284,9 @@ which-pm@^2.2.0: path-exists "^4.0.0" which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2: - version "1.1.15" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" - integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + version "1.1.16" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.16.tgz#db4db429c4706feca2f01677a144278e4a8c216b" + integrity sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ== dependencies: available-typed-arrays "^1.0.7" call-bind "^1.0.7"