stacks 0.58.73 → 0.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buddy/build.ts +38 -0
- package/{core/buddy → buddy}/compile.ts +1 -1
- package/buddy/dist/chunk-d2428b387d843985.js +2016 -0
- package/buddy/dist/cli.d.ts +1 -0
- package/{core/buddy → buddy}/dist/cli.js +23 -9
- package/buddy/dist/commands/build.d.ts +2 -0
- package/buddy/dist/commands/changelog.d.ts +2 -0
- package/buddy/dist/commands/clean.d.ts +2 -0
- package/buddy/dist/commands/cloud.d.ts +2 -0
- package/buddy/dist/commands/commit.d.ts +2 -0
- package/buddy/dist/commands/configure.d.ts +2 -0
- package/buddy/dist/commands/create.d.ts +2 -0
- package/buddy/dist/commands/deploy.d.ts +2 -0
- package/buddy/dist/commands/dev.d.ts +3 -0
- package/buddy/dist/commands/dns.d.ts +2 -0
- package/buddy/dist/commands/domains.d.ts +2 -0
- package/buddy/dist/commands/fresh.d.ts +2 -0
- package/buddy/dist/commands/generate.d.ts +2 -0
- package/buddy/dist/commands/http.d.ts +2 -0
- package/buddy/dist/commands/index.d.ts +31 -0
- package/buddy/dist/commands/install.d.ts +2 -0
- package/buddy/dist/commands/key.d.ts +2 -0
- package/buddy/dist/commands/lint.d.ts +2 -0
- package/buddy/dist/commands/list.d.ts +2 -0
- package/buddy/dist/commands/make.d.ts +2 -0
- package/buddy/dist/commands/migrate.d.ts +2 -0
- package/buddy/dist/commands/ports.d.ts +2 -0
- package/buddy/dist/commands/prepublish.d.ts +2 -0
- package/buddy/dist/commands/projects.d.ts +2 -0
- package/buddy/dist/commands/release.d.ts +2 -0
- package/buddy/dist/commands/seed.d.ts +2 -0
- package/buddy/dist/commands/setup.d.ts +4 -0
- package/buddy/dist/commands/test.d.ts +2 -0
- package/buddy/dist/commands/tinker.d.ts +2 -0
- package/buddy/dist/commands/types.d.ts +2 -0
- package/buddy/dist/commands/upgrade.d.ts +2 -0
- package/buddy/dist/commands/version.d.ts +2 -0
- package/buddy/dist/index.d.ts +1 -0
- package/{core/buddy → buddy}/dist/index.js +2 -5
- package/{core/buddy → buddy}/dist/stacks +0 -0
- package/{core/buddy → buddy}/package.json +1 -3
- package/{core/buddy → buddy}/src/cli.ts +18 -13
- package/{core/buddy → buddy}/src/commands/add.ts +1 -1
- package/{core/buddy → buddy}/src/commands/commit.ts +1 -1
- package/{core/buddy → buddy}/src/commands/deploy.ts +1 -1
- package/{core/buddy → buddy}/src/commands/dev.ts +1 -3
- package/{core/buddy → buddy}/src/commands/index.ts +0 -1
- package/{core/buddy → buddy}/src/commands/list.ts +1 -1
- package/{core/buddy → buddy}/src/commands/make.ts +28 -2
- package/buddy/src/commands/ports.ts +180 -0
- package/{core/buddy → buddy}/src/commands/prepublish.ts +1 -1
- package/{core/buddy → buddy}/src/commands/projects.ts +2 -3
- package/{core/buddy → buddy}/src/commands/setup.ts +1 -0
- package/{core/buddy → buddy}/src/commands/types.ts +1 -1
- package/buddy/tsconfig.tsbuildinfo +1 -0
- package/package.json +285 -285
- package/core/.simple-git-hooks.js +0 -3
- package/core/actions/README.md +0 -58
- package/core/actions/build.ts +0 -5
- package/core/actions/dist/src/add.js +0 -29
- package/core/actions/dist/src/build/component-libs.js +0 -6
- package/core/actions/dist/src/build/core.js +0 -21
- package/core/actions/dist/src/build/stacks.js +0 -8
- package/core/actions/dist/src/build.js +0 -219
- package/core/actions/dist/src/bump.js +0 -14
- package/core/actions/dist/src/changelog.js +0 -17
- package/core/actions/dist/src/clean.js +0 -6
- package/core/actions/dist/src/commit.js +0 -17
- package/core/actions/dist/src/copy-types.js +0 -14
- package/core/actions/dist/src/database/seed.js +0 -1
- package/core/actions/dist/src/deploy/index.js +0 -31
- package/core/actions/dist/src/dev/components.js +0 -11
- package/core/actions/dist/src/dev/docs.js +0 -7
- package/core/actions/dist/src/dev/index.js +0 -92
- package/core/actions/dist/src/examples.js +0 -43
- package/core/actions/dist/src/fresh.js +0 -18
- package/core/actions/dist/src/generate/component-meta.js +0 -59
- package/core/actions/dist/src/generate/ide-helpers.js +0 -91
- package/core/actions/dist/src/generate/index.js +0 -154
- package/core/actions/dist/src/generate/lib-entries.js +0 -170
- package/core/actions/dist/src/generate/vscode-custom-data.js +0 -91
- package/core/actions/dist/src/helpers/component-meta.js +0 -50
- package/core/actions/dist/src/helpers/index.js +0 -48
- package/core/actions/dist/src/helpers/lib-entries.js +0 -161
- package/core/actions/dist/src/helpers/package-json.js +0 -136
- package/core/actions/dist/src/helpers/utils.js +0 -48
- package/core/actions/dist/src/helpers/vscode-custom-data.js +0 -83
- package/core/actions/dist/src/index.js +0 -590
- package/core/actions/dist/src/key-generate.js +0 -10
- package/core/actions/dist/src/lint/fix.js +0 -12
- package/core/actions/dist/src/lint/index.js +0 -17
- package/core/actions/dist/src/make.js +0 -291
- package/core/actions/dist/src/prepublish.js +0 -14
- package/core/actions/dist/src/release.js +0 -559
- package/core/actions/dist/src/test/coverage.js +0 -6
- package/core/actions/dist/src/test/feature.js +0 -6
- package/core/actions/dist/src/test/ui.js +0 -6
- package/core/actions/dist/src/test/unit.js +0 -6
- package/core/actions/dist/src/test.js +0 -6
- package/core/actions/dist/src/tinker.js +0 -5
- package/core/actions/dist/src/typecheck.js +0 -6
- package/core/actions/dist/src/types.js +0 -21
- package/core/actions/dist/src/upgrade/dependencies.js +0 -6
- package/core/actions/dist/src/upgrade/framework.js +0 -1
- package/core/actions/dist/src/upgrade/index.js +0 -58
- package/core/actions/dist/src/upgrade.js +0 -47
- package/core/actions/package.json +0 -92
- package/core/actions/src/action.ts +0 -52
- package/core/actions/src/actions.ts +0 -2
- package/core/actions/src/add.ts +0 -27
- package/core/actions/src/ai/request-model-access.ts +0 -74
- package/core/actions/src/build/cli.ts +0 -7
- package/core/actions/src/build/component-libs.ts +0 -5
- package/core/actions/src/build/core.ts +0 -34
- package/core/actions/src/build/desktop.ts +0 -7
- package/core/actions/src/build/docs.ts +0 -7
- package/core/actions/src/build/server.ts +0 -9
- package/core/actions/src/build/stacks.ts +0 -7
- package/core/actions/src/build.ts +0 -89
- package/core/actions/src/bump.ts +0 -18
- package/core/actions/src/cdn/invalidate-cache.ts +0 -27
- package/core/actions/src/changelog.ts +0 -21
- package/core/actions/src/check/ports.ts +0 -24
- package/core/actions/src/clean.ts +0 -6
- package/core/actions/src/commit.ts +0 -14
- package/core/actions/src/copy-types.ts +0 -22
- package/core/actions/src/database/fields.ts +0 -111
- package/core/actions/src/database/migration-mysql.ts +0 -72
- package/core/actions/src/database/migration-sqlite.ts +0 -67
- package/core/actions/src/database/migration.ts +0 -10
- package/core/actions/src/database/seed.ts +0 -4
- package/core/actions/src/database/user-migration.ts +0 -20
- package/core/actions/src/deploy/create-receipt-rule.ts +0 -55
- package/core/actions/src/deploy/index.ts +0 -46
- package/core/actions/src/dev/api.ts +0 -18
- package/core/actions/src/dev/components.ts +0 -14
- package/core/actions/src/dev/dashboard.ts +0 -7
- package/core/actions/src/dev/desktop.ts +0 -7
- package/core/actions/src/dev/docs.ts +0 -7
- package/core/actions/src/dev/index.ts +0 -48
- package/core/actions/src/dev/system-tray.ts +0 -6
- package/core/actions/src/dev/views.ts +0 -7
- package/core/actions/src/domains/add.ts +0 -67
- package/core/actions/src/domains/purchase.ts +0 -76
- package/core/actions/src/domains/remove.ts +0 -38
- package/core/actions/src/examples.ts +0 -46
- package/core/actions/src/find-projects.ts +0 -21
- package/core/actions/src/fresh.ts +0 -20
- package/core/actions/src/generate/action-types.ts +0 -25
- package/core/actions/src/generate/caddyfile.ts +0 -44
- package/core/actions/src/generate/component-meta.ts +0 -19
- package/core/actions/src/generate/custom-cli-file.ts +0 -24
- package/core/actions/src/generate/env-files.ts +0 -89
- package/core/actions/src/generate/ide-helpers.ts +0 -18
- package/core/actions/src/generate/index.ts +0 -140
- package/core/actions/src/generate/lib-entries.ts +0 -18
- package/core/actions/src/generate/model-classes.ts +0 -299
- package/core/actions/src/generate/model-generate.ts +0 -12
- package/core/actions/src/generate/pkgx-file.ts +0 -72
- package/core/actions/src/generate/symlink-core.ts +0 -3
- package/core/actions/src/generate/types.ts +0 -6
- package/core/actions/src/generate/vscode-custom-data.ts +0 -19
- package/core/actions/src/generate/web-types.ts +0 -2
- package/core/actions/src/helpers/component-meta.ts +0 -93
- package/core/actions/src/helpers/index.ts +0 -1
- package/core/actions/src/helpers/lib-entries.ts +0 -139
- package/core/actions/src/helpers/package-json.ts +0 -96
- package/core/actions/src/helpers/utils.ts +0 -70
- package/core/actions/src/helpers/vscode-custom-data.ts +0 -35
- package/core/actions/src/index.ts +0 -29
- package/core/actions/src/key-generate.ts +0 -10
- package/core/actions/src/lint/fix.ts +0 -13
- package/core/actions/src/lint/index.ts +0 -27
- package/core/actions/src/make.ts +0 -322
- package/core/actions/src/migrate/database.ts +0 -1
- package/core/actions/src/migrate/dns.ts +0 -3
- package/core/actions/src/prepublish.ts +0 -17
- package/core/actions/src/release.ts +0 -18
- package/core/actions/src/start-caddy.ts +0 -13
- package/core/actions/src/test/coverage.ts +0 -5
- package/core/actions/src/test/feature.ts +0 -5
- package/core/actions/src/test/ui.ts +0 -5
- package/core/actions/src/test/unit.ts +0 -5
- package/core/actions/src/test.ts +0 -5
- package/core/actions/src/tinker.ts +0 -10
- package/core/actions/src/typecheck.ts +0 -5
- package/core/actions/src/types.ts +0 -20
- package/core/actions/src/upgrade/binary.ts +0 -43
- package/core/actions/src/upgrade/bun.ts +0 -4
- package/core/actions/src/upgrade/dependencies.ts +0 -0
- package/core/actions/src/upgrade/framework.ts +0 -30
- package/core/actions/src/upgrade/index.ts +0 -28
- package/core/actions/src/upgrade/shell.ts +0 -64
- package/core/actions/src/upgrade.ts +0 -68
- package/core/actions/tests/example.test.ts +0 -5
- package/core/ai/README.md +0 -67
- package/core/ai/build.ts +0 -9
- package/core/ai/dist/index.js +0 -10624
- package/core/ai/package.json +0 -60
- package/core/ai/src/chatbots.ts +0 -0
- package/core/ai/src/image-generation.ts +0 -0
- package/core/ai/src/index.ts +0 -8
- package/core/ai/src/personalization.ts +0 -0
- package/core/ai/src/search.ts +0 -0
- package/core/ai/src/text-generation.ts +0 -0
- package/core/ai/src/text-summary.ts +0 -0
- package/core/ai/src/utils/client-bedrock-runtime.ts +0 -38
- package/core/ai/src/utils/client-bedrock.ts +0 -53
- package/core/ai/tests/example.test.ts +0 -5
- package/core/ai/tsconfig.json +0 -3
- package/core/alias/README.md +0 -53
- package/core/alias/build.ts +0 -8
- package/core/alias/dist/index.js +0 -218
- package/core/alias/package.json +0 -52
- package/core/alias/src/index.ts +0 -220
- package/core/alias/tests/example.test.ts +0 -5
- package/core/alias/tsconfig.json +0 -3
- package/core/analytics/README.md +0 -55
- package/core/analytics/build.ts +0 -8
- package/core/analytics/dist/index.js +0 -5
- package/core/analytics/package.json +0 -55
- package/core/analytics/src/drivers/fathom.ts +0 -1
- package/core/analytics/src/drivers/index.ts +0 -1
- package/core/analytics/src/index.ts +0 -1
- package/core/analytics/tests/example.test.ts +0 -5
- package/core/analytics/tsconfig.json +0 -3
- package/core/api/build.ts +0 -7
- package/core/api/dist/index.js +0 -639
- package/core/api/package.json +0 -61
- package/core/api/src/index.ts +0 -115
- package/core/api/tsconfig.json +0 -3
- package/core/arrays/README.md +0 -59
- package/core/arrays/build.ts +0 -8
- package/core/arrays/dist/index.js +0 -469
- package/core/arrays/package.json +0 -60
- package/core/arrays/src/arr.ts +0 -3
- package/core/arrays/src/contains.ts +0 -87
- package/core/arrays/src/helpers.ts +0 -272
- package/core/arrays/src/index.ts +0 -3
- package/core/arrays/src/macro.ts +0 -131
- package/core/arrays/src/math.ts +0 -220
- package/core/arrays/tests/example.test.ts +0 -5
- package/core/arrays/tsconfig.json +0 -3
- package/core/auth/README.md +0 -59
- package/core/auth/build.ts +0 -8
- package/core/auth/dist/index.js +0 -5
- package/core/auth/package.json +0 -51
- package/core/auth/src/index.ts +0 -1
- package/core/auth/tests/example.test.ts +0 -5
- package/core/auth/tsconfig.json +0 -3
- package/core/buddy/build.ts +0 -8
- package/core/buddy/dist/chunk-1a569f35f66ae151.js +0 -10945
- package/core/buddy/dist/chunk-bf054cfbc9cf2201.js +0 -993
- package/core/buddy/src/commands/check.ts +0 -45
- package/core/buddy/src/commands/ports.ts +0 -73
- package/core/buddy/tsconfig.json +0 -3
- package/core/build/README.md +0 -59
- package/core/build/build.ts +0 -8
- package/core/build/dist/index.js +0 -19
- package/core/build/package.json +0 -64
- package/core/build/src/index.ts +0 -11
- package/core/build/tests/example.test.ts +0 -5
- package/core/build/tsconfig.json +0 -3
- package/core/build/web-types.config.cjs +0 -5
- package/core/build/web-types.ts +0 -15
- package/core/bun-create/bud/README.md +0 -45
- package/core/bun-create/bud/package.json +0 -151
- package/core/bun-create/buddy/README.md +0 -45
- package/core/bun-create/buddy/package.json +0 -150
- package/core/bun-create/stack/README.md +0 -45
- package/core/bun-create/stack/package.json +0 -150
- package/core/bun-create/stacks/README.md +0 -45
- package/core/bun-create/stacks/package.json +0 -150
- package/core/bun-create/stx/README.md +0 -45
- package/core/bun-create/stx/package.json +0 -151
- package/core/bun-plugin-yml/README.md +0 -56
- package/core/bun-plugin-yml/TODO.md +0 -1
- package/core/bun-plugin-yml/build.ts +0 -8
- package/core/bun-plugin-yml/dist/index.js +0 -2762
- package/core/bun-plugin-yml/package.json +0 -62
- package/core/bun-plugin-yml/src/index.ts +0 -21
- package/core/bun-plugin-yml/tests/example.test.ts +0 -5
- package/core/bun-plugin-yml/tsconfig.json +0 -3
- package/core/cache/README.md +0 -59
- package/core/cache/build.ts +0 -8
- package/core/cache/dist/index.js +0 -88
- package/core/cache/package.json +0 -66
- package/core/cache/src/drivers/dynamodb.ts +0 -119
- package/core/cache/src/drivers/index.ts +0 -2
- package/core/cache/src/drivers/redis.ts +0 -37
- package/core/cache/src/index.ts +0 -1
- package/core/cache/tests/DynamoDB.test.ts +0 -135
- package/core/cache/tests/Memcached.test.ts +0 -51
- package/core/cache/tests/Redis.test.ts +0 -84
- package/core/cache/tsconfig.json +0 -3
- package/core/chat/README.md +0 -83
- package/core/chat/build.ts +0 -8
- package/core/chat/dist/index.js +0 -42
- package/core/chat/package.json +0 -74
- package/core/chat/src/drivers/discord.ts +0 -15
- package/core/chat/src/drivers/slack.ts +0 -24
- package/core/chat/src/drivers/teams.ts +0 -24
- package/core/chat/src/index.ts +0 -3
- package/core/chat/tests/example.test.ts +0 -5
- package/core/chat/tsconfig.json +0 -3
- package/core/cli/README.md +0 -168
- package/core/cli/build.ts +0 -8
- package/core/cli/dist/index.js +0 -780
- package/core/cli/package.json +0 -92
- package/core/cli/src/actions/index.ts +0 -1
- package/core/cli/src/actions/install.ts +0 -40
- package/core/cli/src/cli.ts +0 -30
- package/core/cli/src/command.ts +0 -47
- package/core/cli/src/console.ts +0 -79
- package/core/cli/src/exec.ts +0 -114
- package/core/cli/src/helpers.ts +0 -80
- package/core/cli/src/index.ts +0 -10
- package/core/cli/src/parse.ts +0 -179
- package/core/cli/src/run.ts +0 -99
- package/core/cli/src/spinner.ts +0 -3
- package/core/cli/src/utils.ts +0 -82
- package/core/cli/tests/example.test.ts +0 -5
- package/core/cli/tsconfig.json +0 -3
- package/core/cloud/README.md +0 -67
- package/core/cloud/build.ts +0 -12
- package/core/cloud/dist/index.js +0 -2013
- package/core/cloud/dist/origin-request.js +0 -27
- package/core/cloud/package.json +0 -113
- package/core/cloud/src/cloud/ai.ts +0 -94
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +0 -386
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +0 -15
- package/core/cloud/src/cloud/cache.ts +0 -0
- package/core/cloud/src/cloud/cdn.ts +0 -427
- package/core/cloud/src/cloud/cli.ts +0 -45
- package/core/cloud/src/cloud/compute.ts +0 -212
- package/core/cloud/src/cloud/dashboard.ts +0 -86
- package/core/cloud/src/cloud/database.ts +0 -0
- package/core/cloud/src/cloud/deployment.ts +0 -41
- package/core/cloud/src/cloud/dns.ts +0 -42
- package/core/cloud/src/cloud/docs.ts +0 -51
- package/core/cloud/src/cloud/email.ts +0 -339
- package/core/cloud/src/cloud/file-system.ts +0 -35
- package/core/cloud/src/cloud/index.ts +0 -135
- package/core/cloud/src/cloud/jump-box.ts +0 -48
- package/core/cloud/src/cloud/lambda/ask/index.js +0 -35
- package/core/cloud/src/cloud/lambda/cli-setup/index.js +0 -67
- package/core/cloud/src/cloud/lambda/summarize/index.js +0 -35
- package/core/cloud/src/cloud/network.ts +0 -32
- package/core/cloud/src/cloud/permissions.ts +0 -33
- package/core/cloud/src/cloud/queue.ts +0 -142
- package/core/cloud/src/cloud/redirects.ts +0 -45
- package/core/cloud/src/cloud/router-layer/nodejs/package.json +0 -15
- package/core/cloud/src/cloud/search-engine.ts +0 -108
- package/core/cloud/src/cloud/security.ts +0 -259
- package/core/cloud/src/cloud/storage.ts +0 -168
- package/core/cloud/src/edge/origin-request.ts +0 -49
- package/core/cloud/src/helpers.ts +0 -609
- package/core/cloud/src/index.ts +0 -2
- package/core/cloud/src/types.ts +0 -28
- package/core/cloud/tests/example.test.ts +0 -5
- package/core/cloud/tsconfig.json +0 -3
- package/core/cloud/zip.ts +0 -17
- package/core/collections/README.md +0 -71
- package/core/collections/build.ts +0 -8
- package/core/collections/dist/index.js +0 -6
- package/core/collections/package.json +0 -58
- package/core/collections/src/index.ts +0 -1
- package/core/collections/tests/example.test.ts +0 -5
- package/core/collections/tsconfig.json +0 -3
- package/core/config/README.md +0 -71
- package/core/config/build.ts +0 -8
- package/core/config/dist/index.js +0 -1823
- package/core/config/package.json +0 -54
- package/core/config/src/config.ts +0 -39
- package/core/config/src/defaults.ts +0 -481
- package/core/config/src/helpers.ts +0 -256
- package/core/config/src/index.ts +0 -2
- package/core/config/src/overrides.ts +0 -51
- package/core/config/tests/example.test.ts +0 -5
- package/core/config/tsconfig.json +0 -3
- package/core/custom-elements.json +0 -4
- package/core/database/README.md +0 -59
- package/core/database/build.ts +0 -8
- package/core/database/dist/index.js +0 -200
- package/core/database/package.json +0 -79
- package/core/database/src/index.ts +0 -63
- package/core/database/src/kysely-bun-worker/driver.ts +0 -144
- package/core/database/src/kysely-bun-worker/index.ts +0 -46
- package/core/database/src/kysely-bun-worker/mitt.ts +0 -24
- package/core/database/src/kysely-bun-worker/type.ts +0 -40
- package/core/database/src/kysely-bun-worker/worker.ts +0 -52
- package/core/database/src/migrations/index.ts +0 -73
- package/core/database/src/seeder/index.ts +0 -79
- package/core/database/tests/example.test.ts +0 -5
- package/core/database/tsconfig.json +0 -3
- package/core/datetime/README.md +0 -66
- package/core/datetime/build.ts +0 -8
- package/core/datetime/dist/index.js +0 -9
- package/core/datetime/package.json +0 -57
- package/core/datetime/src/index.ts +0 -7
- package/core/datetime/tests/example.test.ts +0 -5
- package/core/datetime/tsconfig.json +0 -3
- package/core/desktop/README.md +0 -49
- package/core/desktop/build.ts +0 -8
- package/core/desktop/dist/index.js +0 -3081
- package/core/desktop/package.json +0 -83
- package/core/desktop/src/index.ts +0 -43
- package/core/desktop/src/system-tray.ts +0 -1
- package/core/desktop/tests/example.test.ts +0 -5
- package/core/desktop/tsconfig.json +0 -3
- package/core/development/README.md +0 -27
- package/core/development/build.ts +0 -8
- package/core/development/dist/index.js +0 -6
- package/core/development/package.json +0 -77
- package/core/development/src/index.ts +0 -0
- package/core/development/tests/example.test.ts +0 -5
- package/core/development/tsconfig.json +0 -3
- package/core/dns/README.md +0 -56
- package/core/dns/build.ts +0 -8
- package/core/dns/dist/index.js +0 -166
- package/core/dns/package.json +0 -77
- package/core/dns/src/drivers/aws.ts +0 -224
- package/core/dns/src/index.ts +0 -20
- package/core/dns/tests/example.test.ts +0 -5
- package/core/dns/tsconfig.json +0 -3
- package/core/docs/README.md +0 -59
- package/core/docs/build.ts +0 -8
- package/core/docs/dist/index.js +0 -205
- package/core/docs/package.json +0 -70
- package/core/docs/src/index.ts +0 -67
- package/core/docs/src/meta.ts +0 -32
- package/core/docs/src/plugins.ts +0 -4
- package/core/docs/src/scripts/pwa.ts +0 -116
- package/core/docs/tests/example.test.ts +0 -5
- package/core/docs/tsconfig.json +0 -3
- package/core/email/README.md +0 -155
- package/core/email/build-inbound.ts +0 -8
- package/core/email/build.ts +0 -8
- package/core/email/dist/index.js +0 -306735
- package/core/email/email-forwarder.cjs +0 -407
- package/core/email/email-forwarder.zip +0 -0
- package/core/email/package.json +0 -69
- package/core/email/src/drivers/index.ts +0 -3
- package/core/email/src/drivers/mailgun.ts +0 -21
- package/core/email/src/drivers/nodemailer.ts +0 -23
- package/core/email/src/drivers/ses.ts +0 -22
- package/core/email/src/email.ts +0 -84
- package/core/email/src/index.ts +0 -3
- package/core/email/src/send.ts +0 -37
- package/core/email/src/server/converter.ts +0 -305
- package/core/email/src/server/inbound.ts +0 -406
- package/core/email/src/server/outbound.ts +0 -296
- package/core/email/src/template.ts +0 -18
- package/core/email/src/types.ts +0 -39
- package/core/email/src/utils/config.ts +0 -7
- package/core/email/tests/example.test.ts +0 -5
- package/core/email/tsconfig.json +0 -3
- package/core/enums/README.md +0 -54
- package/core/enums/build.ts +0 -8
- package/core/enums/dist/index.js +0 -105
- package/core/enums/package.json +0 -49
- package/core/enums/src/index.ts +0 -102
- package/core/enums/tests/example.test.ts +0 -5
- package/core/enums/tsconfig.json +0 -3
- package/core/env/README.md +0 -71
- package/core/env/build.ts +0 -8
- package/core/env/dist/index.js +0 -238
- package/core/env/package.json +0 -55
- package/core/env/src/index.ts +0 -76
- package/core/env/src/types.ts +0 -54
- package/core/env/src/utils.ts +0 -1
- package/core/env/tests/example.test.ts +0 -5
- package/core/env/tsconfig.json +0 -3
- package/core/error-handling/README.md +0 -131
- package/core/error-handling/build.ts +0 -8
- package/core/error-handling/dist/index.js +0 -432
- package/core/error-handling/package.json +0 -63
- package/core/error-handling/src/handler.ts +0 -51
- package/core/error-handling/src/index.ts +0 -2
- package/core/error-handling/tests/example.test.ts +0 -5
- package/core/error-handling/tsconfig.json +0 -3
- package/core/eslint-config/.gitattributes +0 -2
- package/core/eslint-config/README.md +0 -587
- package/core/eslint-config/build.ts +0 -8
- package/core/eslint-config/package.json +0 -122
- package/core/eslint-config/src/configs/comments.ts +0 -19
- package/core/eslint-config/src/configs/formatters.ts +0 -187
- package/core/eslint-config/src/configs/ignores.ts +0 -10
- package/core/eslint-config/src/configs/imports.ts +0 -46
- package/core/eslint-config/src/configs/index.ts +0 -21
- package/core/eslint-config/src/configs/javascript.ts +0 -226
- package/core/eslint-config/src/configs/jsdoc.ts +0 -42
- package/core/eslint-config/src/configs/jsonc.ts +0 -86
- package/core/eslint-config/src/configs/markdown.ts +0 -110
- package/core/eslint-config/src/configs/node.ts +0 -23
- package/core/eslint-config/src/configs/perfectionist.ts +0 -18
- package/core/eslint-config/src/configs/react.ts +0 -111
- package/core/eslint-config/src/configs/sort.ts +0 -223
- package/core/eslint-config/src/configs/stylistic.ts +0 -57
- package/core/eslint-config/src/configs/svelte.ts +0 -107
- package/core/eslint-config/src/configs/test.ts +0 -54
- package/core/eslint-config/src/configs/toml.ts +0 -72
- package/core/eslint-config/src/configs/typescript.ts +0 -157
- package/core/eslint-config/src/configs/unicorn.ts +0 -41
- package/core/eslint-config/src/configs/unocss.ts +0 -43
- package/core/eslint-config/src/configs/vue.ts +0 -168
- package/core/eslint-config/src/configs/yaml.ts +0 -72
- package/core/eslint-config/src/factory.ts +0 -255
- package/core/eslint-config/src/globs.ts +0 -91
- package/core/eslint-config/src/index.ts +0 -9
- package/core/eslint-config/src/plugins.ts +0 -10
- package/core/eslint-config/src/stub.d.ts +0 -3
- package/core/eslint-config/src/types.ts +0 -366
- package/core/eslint-config/src/utils.ts +0 -72
- package/core/eslint-config/src/vendor/prettier-types.ts +0 -136
- package/core/eslint-config/test/cli.spec.ts +0 -91
- package/core/eslint-config/test/fixtures.test.ts +0 -125
- package/core/eslint-config/tsconfig.json +0 -17
- package/core/eslint-config/tsup.config.ts +0 -8
- package/core/events/README.md +0 -76
- package/core/events/build.ts +0 -8
- package/core/events/dist/index.js +0 -63
- package/core/events/package.json +0 -53
- package/core/events/src/index.ts +0 -167
- package/core/events/tests/example.test.ts +0 -5
- package/core/events/tsconfig.json +0 -3
- package/core/faker/README.md +0 -53
- package/core/faker/build.ts +0 -8
- package/core/faker/dist/index.js +0 -6
- package/core/faker/package.json +0 -62
- package/core/faker/src/index.ts +0 -1
- package/core/faker/tests/example.test.ts +0 -5
- package/core/faker/tsconfig.json +0 -3
- package/core/git/README.md +0 -65
- package/core/git/build.ts +0 -8
- package/core/git/dist/index.js +0 -46
- package/core/git/package.json +0 -69
- package/core/git/src/index.ts +0 -63
- package/core/git/tests/example.test.ts +0 -5
- package/core/git/tsconfig.json +0 -3
- package/core/health/README.md +0 -56
- package/core/health/build.ts +0 -8
- package/core/health/dist/index.js +0 -9
- package/core/health/package.json +0 -59
- package/core/health/src/drivers/index.ts +0 -1
- package/core/health/src/drivers/ohdear.ts +0 -1
- package/core/health/src/index.ts +0 -2
- package/core/health/src/notifications/index.ts +0 -1
- package/core/health/tests/example.test.ts +0 -5
- package/core/health/tsconfig.json +0 -3
- package/core/http/README.md +0 -59
- package/core/http/build.ts +0 -8
- package/core/http/dist/index.js +0 -65
- package/core/http/package.json +0 -53
- package/core/http/src/index.ts +0 -71
- package/core/http/tsconfig.json +0 -3
- package/core/index.ts +0 -57
- package/core/lint/.eslintrc.json +0 -3
- package/core/lint/README.md +0 -73
- package/core/lint/build.ts +0 -8
- package/core/lint/dist/index.js +0 -6
- package/core/lint/package.json +0 -70
- package/core/lint/src/index.ts +0 -3
- package/core/lint/tests/example.test.ts +0 -5
- package/core/lint/tsconfig.json +0 -3
- package/core/logging/README.md +0 -58
- package/core/logging/build.ts +0 -8
- package/core/logging/dist/index.js +0 -90
- package/core/logging/package.json +0 -62
- package/core/logging/src/index.ts +0 -137
- package/core/logging/tests/example.test.ts +0 -5
- package/core/logging/tsconfig.json +0 -3
- package/core/notifications/README.md +0 -272
- package/core/notifications/build.ts +0 -8
- package/core/notifications/dist/index.js +0 -54
- package/core/notifications/package.json +0 -104
- package/core/notifications/src/drivers/chat.ts +0 -1
- package/core/notifications/src/drivers/email.ts +0 -1
- package/core/notifications/src/drivers/index.ts +0 -4
- package/core/notifications/src/drivers/push.ts +0 -1
- package/core/notifications/src/drivers/sms.ts +0 -1
- package/core/notifications/src/index.ts +0 -51
- package/core/notifications/src/tailwind.config.ts +0 -39
- package/core/notifications/src/utils/config.ts +0 -5
- package/core/notifications/src/utils/template.html +0 -8
- package/core/notifications/tests/chat/Slack.test.ts +0 -34
- package/core/notifications/tests/email/Mailgun.test.ts +0 -40
- package/core/notifications/tests/email/Sendgrid.test.ts +0 -40
- package/core/notifications/tests/sms/Twilio.test.ts +0 -37
- package/core/notifications/tsconfig.json +0 -3
- package/core/objects/README.md +0 -71
- package/core/objects/build.ts +0 -8
- package/core/objects/dist/index.js +0 -64
- package/core/objects/package.json +0 -64
- package/core/objects/src/index.ts +0 -145
- package/core/objects/tests/example.test.ts +0 -5
- package/core/objects/tsconfig.json +0 -3
- package/core/orm/README.md +0 -48
- package/core/orm/build.ts +0 -8
- package/core/orm/dist/index.js +0 -6
- package/core/orm/package.json +0 -60
- package/core/orm/src/index.ts +0 -49
- package/core/orm/tests/example.test.ts +0 -5
- package/core/orm/tsconfig.json +0 -3
- package/core/path/README.md +0 -64
- package/core/path/build.ts +0 -8
- package/core/path/dist/index.js +0 -587
- package/core/path/package.json +0 -55
- package/core/path/src/index.ts +0 -632
- package/core/path/tests/example.test.ts +0 -5
- package/core/path/tsconfig.json +0 -3
- package/core/payments/README.md +0 -64
- package/core/payments/build.ts +0 -8
- package/core/payments/dist/index.js +0 -6297
- package/core/payments/package.json +0 -61
- package/core/payments/src/drivers/stripe.ts +0 -116
- package/core/payments/src/index.ts +0 -1
- package/core/payments/tests/example.test.ts +0 -5
- package/core/payments/tsconfig.json +0 -3
- package/core/playwright.config.ts +0 -109
- package/core/push/README.md +0 -71
- package/core/push/build.ts +0 -9
- package/core/push/dist/index.js +0 -35
- package/core/push/package.json +0 -65
- package/core/push/src/drivers/expo.ts +0 -21
- package/core/push/src/drivers/fcm.ts +0 -21
- package/core/push/src/drivers/index.ts +0 -2
- package/core/push/src/index.ts +0 -1
- package/core/push/tests/example.test.ts +0 -5
- package/core/push/tsconfig.json +0 -3
- package/core/query-builder/README.md +0 -48
- package/core/query-builder/build.ts +0 -8
- package/core/query-builder/dist/index.js +0 -18
- package/core/query-builder/package.json +0 -60
- package/core/query-builder/src/index.ts +0 -1
- package/core/query-builder/src/kysely.ts +0 -38
- package/core/query-builder/tests/example.test.ts +0 -5
- package/core/query-builder/tsconfig.json +0 -3
- package/core/queue/README.md +0 -59
- package/core/queue/build.ts +0 -8
- package/core/queue/dist/index.js +0 -25
- package/core/queue/package.json +0 -56
- package/core/queue/src/index.ts +0 -23
- package/core/queue/tests/example.test.ts +0 -5
- package/core/queue/tsconfig.json +0 -3
- package/core/raycast/package.json +0 -9
- package/core/raycast/src/index.ts +0 -0
- package/core/realtime/README.md +0 -59
- package/core/realtime/build.ts +0 -8
- package/core/realtime/dist/index.js +0 -6
- package/core/realtime/package.json +0 -53
- package/core/realtime/src/drivers/index.ts +0 -1
- package/core/realtime/src/index.ts +0 -1
- package/core/realtime/tests/example.test.ts +0 -5
- package/core/realtime/tsconfig.json +0 -3
- package/core/repl/README.md +0 -53
- package/core/repl/build.ts +0 -8
- package/core/repl/dist/index.js +0 -6
- package/core/repl/package.json +0 -60
- package/core/repl/src/index.ts +0 -1
- package/core/repl/tests/example.test.ts +0 -5
- package/core/repl/tsconfig.json +0 -3
- package/core/router/README.md +0 -59
- package/core/router/build.ts +0 -8
- package/core/router/dist/index.js +0 -1544
- package/core/router/package.json +0 -64
- package/core/router/src/index.ts +0 -4
- package/core/router/src/middleware.ts +0 -34
- package/core/router/src/request.ts +0 -44
- package/core/router/src/router.ts +0 -310
- package/core/router/src/server.ts +0 -173
- package/core/router/tests/example.test.ts +0 -5
- package/core/router/tsconfig.json +0 -3
- package/core/scheduler/README.md +0 -137
- package/core/scheduler/build.ts +0 -8
- package/core/scheduler/dist/index.js +0 -742
- package/core/scheduler/package.json +0 -62
- package/core/scheduler/src/constants.ts +0 -81
- package/core/scheduler/src/errors.ts +0 -7
- package/core/scheduler/src/index.ts +0 -20
- package/core/scheduler/src/job.ts +0 -315
- package/core/scheduler/src/schedule.ts +0 -116
- package/core/scheduler/src/time.ts +0 -823
- package/core/scheduler/src/types/cron.ts +0 -98
- package/core/scheduler/src/types/utils.ts +0 -14
- package/core/scheduler/src/utils.ts +0 -19
- package/core/scheduler/tests/cron.fuzz.ts +0 -120
- package/core/scheduler/tests/cron.test.ts +0 -1243
- package/core/scheduler/tests/crontime.test.ts +0 -780
- package/core/scheduler/tsconfig.json +0 -3
- package/core/search-engine/README.md +0 -66
- package/core/search-engine/build.ts +0 -8
- package/core/search-engine/dist/index.js +0 -87
- package/core/search-engine/package.json +0 -68
- package/core/search-engine/src/drivers/index.ts +0 -1
- package/core/search-engine/src/drivers/meilisearch.ts +0 -124
- package/core/search-engine/src/drivers/opensearch.ts +0 -59
- package/core/search-engine/src/helpers.ts +0 -138
- package/core/search-engine/src/index.ts +0 -69
- package/core/search-engine/tests/example.test.ts +0 -5
- package/core/search-engine/tsconfig.json +0 -3
- package/core/security/README.md +0 -66
- package/core/security/build.ts +0 -8
- package/core/security/dist/index.js +0 -3285
- package/core/security/package.json +0 -66
- package/core/security/src/crypt.ts +0 -23
- package/core/security/src/hash.ts +0 -54
- package/core/security/src/index.ts +0 -3
- package/core/security/src/key.ts +0 -11
- package/core/security/tests/example.test.ts +0 -5
- package/core/security/tsconfig.json +0 -3
- package/core/server/README.md +0 -51
- package/core/server/build.ts +0 -8
- package/core/server/dist/index.js +0 -13591
- package/core/server/package.json +0 -68
- package/core/server/src/config.ts +0 -76
- package/core/server/src/index.ts +0 -1
- package/core/server/tests/example.test.ts +0 -5
- package/core/server/tsconfig.json +0 -3
- package/core/shell/README.md +0 -55
- package/core/shell/build.ts +0 -8
- package/core/shell/dist/index.js +0 -6
- package/core/shell/package.json +0 -39
- package/core/shell/src/buddy.plugin.zsh +0 -120
- package/core/shell/src/index.ts +0 -1
- package/core/signals/README.md +0 -105
- package/core/signals/build.ts +0 -8
- package/core/signals/dist/index.js +0 -9
- package/core/signals/package.json +0 -64
- package/core/signals/src/index.ts +0 -1
- package/core/signals/tests/example.test.ts +0 -5
- package/core/signals/tsconfig.json +0 -3
- package/core/slug/README.md +0 -59
- package/core/slug/build.ts +0 -8
- package/core/slug/dist/index.js +0 -5
- package/core/slug/package.json +0 -66
- package/core/slug/src/index.ts +0 -56
- package/core/slug/tests/example.test.ts +0 -5
- package/core/slug/tsconfig.json +0 -3
- package/core/sms/README.md +0 -137
- package/core/sms/build.ts +0 -9
- package/core/sms/dist/index.js +0 -240
- package/core/sms/package.json +0 -83
- package/core/sms/src/drivers/gupshup.ts +0 -21
- package/core/sms/src/drivers/index.ts +0 -8
- package/core/sms/src/drivers/nexmo.ts +0 -23
- package/core/sms/src/drivers/plivo.ts +0 -23
- package/core/sms/src/drivers/sms77.ts +0 -22
- package/core/sms/src/drivers/sns.ts +0 -22
- package/core/sms/src/drivers/telnyx.ts +0 -23
- package/core/sms/src/drivers/termii.ts +0 -22
- package/core/sms/src/drivers/twilio.ts +0 -23
- package/core/sms/src/index.ts +0 -1
- package/core/sms/tests/example.test.ts +0 -5
- package/core/sms/tsconfig.json +0 -3
- package/core/storage/README.md +0 -74
- package/core/storage/build.ts +0 -8
- package/core/storage/dist/index.js +0 -816
- package/core/storage/package.json +0 -78
- package/core/storage/src/copy.ts +0 -42
- package/core/storage/src/delete.ts +0 -131
- package/core/storage/src/drivers/aws.ts +0 -15
- package/core/storage/src/drivers/index.ts +0 -1
- package/core/storage/src/files.ts +0 -187
- package/core/storage/src/folders.ts +0 -51
- package/core/storage/src/fs.ts +0 -9
- package/core/storage/src/glob.ts +0 -1
- package/core/storage/src/hash.ts +0 -39
- package/core/storage/src/helpers.ts +0 -29
- package/core/storage/src/index.ts +0 -11
- package/core/storage/src/move.ts +0 -84
- package/core/storage/src/storage.ts +0 -10
- package/core/storage/src/visibility.ts +0 -6
- package/core/storage/src/zip.ts +0 -55
- package/core/storage/tests/example.test.ts +0 -5
- package/core/storage/tsconfig.json +0 -3
- package/core/strings/README.md +0 -137
- package/core/strings/build.ts +0 -9
- package/core/strings/dist/index.js +0 -393
- package/core/strings/package.json +0 -82
- package/core/strings/src/case.ts +0 -27
- package/core/strings/src/helpers.ts +0 -3
- package/core/strings/src/index.ts +0 -2
- package/core/strings/src/is.ts +0 -170
- package/core/strings/src/macro.ts +0 -131
- package/core/strings/src/pluralize.ts +0 -26
- package/core/strings/src/string.ts +0 -5
- package/core/strings/src/types.ts +0 -4
- package/core/strings/src/utils.ts +0 -117
- package/core/strings/tests/example.test.ts +0 -5
- package/core/strings/tsconfig.json +0 -3
- package/core/tables/README.md +0 -110
- package/core/tables/examples/vue/App.stx +0 -12
- package/core/tables/examples/vue/favicon.png +0 -0
- package/core/tables/examples/vue/index.html +0 -20
- package/core/tables/examples/web/favicon.png +0 -0
- package/core/tables/examples/web/index.html +0 -13
- package/core/tables/index.html +0 -13
- package/core/tables/package.json +0 -57
- package/core/tables/src/App.stx +0 -23
- package/core/tables/src/commands/index.ts +0 -1
- package/core/tables/src/components/Demo.stx +0 -84
- package/core/tables/src/components/README.md +0 -109
- package/core/tables/src/components/Table.stx +0 -342
- package/core/tables/src/components/TableBody.stx +0 -32
- package/core/tables/src/components/TableCellActionItems.stx +0 -9
- package/core/tables/src/components/TableFilters.stx +0 -704
- package/core/tables/src/components/TableHead.stx +0 -60
- package/core/tables/src/components/TablePagination.stx +0 -131
- package/core/tables/src/components/TableRow.stx +0 -73
- package/core/tables/src/components/TableSearch.stx +0 -39
- package/core/tables/src/components/Tooltip.stx +0 -10
- package/core/tables/src/components.d.ts +0 -24
- package/core/tables/src/config/tables.ts +0 -2
- package/core/tables/src/docs/index.md +0 -0
- package/core/tables/src/functions/README.md +0 -8
- package/core/tables/src/functions/dark.ts +0 -3
- package/core/tables/src/functions/index.ts +0 -2
- package/core/tables/src/functions/table.ts +0 -207
- package/core/tables/src/main.ts +0 -4
- package/core/tables/tests/example.test.ts +0 -5
- package/core/tables/tsconfig.json +0 -3
- package/core/testing/README.md +0 -59
- package/core/testing/build.ts +0 -8
- package/core/testing/dist/index.js +0 -15025
- package/core/testing/package.json +0 -65
- package/core/testing/src/index.ts +0 -13
- package/core/testing/tsconfig.json +0 -3
- package/core/tinker/package.json +0 -47
- package/core/tinker/src/index.ts +0 -1
- package/core/tinker/tsconfig.json +0 -3
- package/core/tmp.json +0 -0
- package/core/tsconfig.json +0 -83
- package/core/tunnel/README.md +0 -53
- package/core/tunnel/build.ts +0 -8
- package/core/tunnel/dist/index.js +0 -10
- package/core/tunnel/package.json +0 -58
- package/core/tunnel/src/index.ts +0 -6
- package/core/tunnel/tests/example.test.ts +0 -5
- package/core/tunnel/tsconfig.json +0 -3
- package/core/types/README.md +0 -59
- package/core/types/build.ts +0 -8
- package/core/types/dist/index.js +0 -2285
- package/core/types/package.json +0 -87
- package/core/types/src/ai.ts +0 -26
- package/core/types/src/analytics.ts +0 -21
- package/core/types/src/api.ts +0 -65
- package/core/types/src/app.ts +0 -151
- package/core/types/src/auto-imports.ts +0 -1
- package/core/types/src/binary.ts +0 -13
- package/core/types/src/build.ts +0 -2
- package/core/types/src/cache.ts +0 -98
- package/core/types/src/cdn.ts +0 -17
- package/core/types/src/chat.ts +0 -5
- package/core/types/src/cli.ts +0 -333
- package/core/types/src/cloud.ts +0 -105
- package/core/types/src/components.ts +0 -64
- package/core/types/src/configure.ts +0 -13
- package/core/types/src/cron-jobs.ts +0 -51
- package/core/types/src/database.ts +0 -45
- package/core/types/src/dependencies.ts +0 -69
- package/core/types/src/deploy.ts +0 -13
- package/core/types/src/dns.ts +0 -186
- package/core/types/src/docs.ts +0 -26
- package/core/types/src/email.ts +0 -19
- package/core/types/src/env.ts +0 -1
- package/core/types/src/errors.ts +0 -11
- package/core/types/src/events.ts +0 -30
- package/core/types/src/exit-code.ts +0 -10
- package/core/types/src/file-systems.ts +0 -70
- package/core/types/src/git.ts +0 -133
- package/core/types/src/hashing.ts +0 -131
- package/core/types/src/helpers.ts +0 -11
- package/core/types/src/i18n.ts +0 -19
- package/core/types/src/index.ts +0 -61
- package/core/types/src/inspect.ts +0 -10
- package/core/types/src/layout.ts +0 -8
- package/core/types/src/library.ts +0 -156
- package/core/types/src/logger.ts +0 -54
- package/core/types/src/manifest.ts +0 -9
- package/core/types/src/model.ts +0 -72
- package/core/types/src/money.ts +0 -3
- package/core/types/src/native.ts +0 -0
- package/core/types/src/notifications.ts +0 -147
- package/core/types/src/pages.ts +0 -10
- package/core/types/src/payments.ts +0 -65
- package/core/types/src/ports.ts +0 -19
- package/core/types/src/promise.ts +0 -1
- package/core/types/src/push.ts +0 -36
- package/core/types/src/pwa.ts +0 -8
- package/core/types/src/queue.ts +0 -38
- package/core/types/src/reactivity.ts +0 -1
- package/core/types/src/request.ts +0 -3
- package/core/types/src/router.ts +0 -73
- package/core/types/src/scheduler.ts +0 -1
- package/core/types/src/search-engine.ts +0 -136
- package/core/types/src/security.ts +0 -23
- package/core/types/src/services.ts +0 -44
- package/core/types/src/sms.ts +0 -5
- package/core/types/src/ssg.ts +0 -3
- package/core/types/src/stacks.ts +0 -246
- package/core/types/src/storage.ts +0 -13
- package/core/types/src/tables.ts +0 -57
- package/core/types/src/team.ts +0 -8
- package/core/types/src/ui.ts +0 -189
- package/core/types/src/utils.ts +0 -47
- package/core/types/tsconfig.json +0 -3
- package/core/ui/README.md +0 -66
- package/core/ui/build.ts +0 -8
- package/core/ui/dist/components.js +0 -68
- package/core/ui/dist/index.js +0 -121
- package/core/ui/package.json +0 -93
- package/core/ui/src/components/autocomplete.ts +0 -0
- package/core/ui/src/components/disclosure.ts +0 -5
- package/core/ui/src/components/menu.ts +0 -1
- package/core/ui/src/components/modal.ts +0 -6
- package/core/ui/src/components/popover.ts +0 -1
- package/core/ui/src/components/radio-group.ts +0 -5
- package/core/ui/src/components/select.ts +0 -6
- package/core/ui/src/components/tabs.ts +0 -1
- package/core/ui/src/components/toggle.ts +0 -1
- package/core/ui/src/components/transition.ts +0 -1
- package/core/ui/src/components.ts +0 -10
- package/core/ui/src/index.ts +0 -15
- package/core/ui/src/uno.config.ts +0 -66
- package/core/ui/tests/example.test.ts +0 -5
- package/core/ui/tsconfig.json +0 -3
- package/core/utils/build.ts +0 -8
- package/core/utils/dist/index.js +0 -3240
- package/core/utils/package.json +0 -111
- package/core/utils/scripts/export-size.ts +0 -94
- package/core/utils/src/base.ts +0 -12
- package/core/utils/src/clean.ts +0 -17
- package/core/utils/src/config.ts +0 -25
- package/core/utils/src/currency.ts +0 -29
- package/core/utils/src/debounce.ts +0 -1
- package/core/utils/src/delete.ts +0 -1
- package/core/utils/src/equal.ts +0 -27
- package/core/utils/src/export-size.ts +0 -1
- package/core/utils/src/find.ts +0 -91
- package/core/utils/src/function.ts +0 -32
- package/core/utils/src/git.ts +0 -11
- package/core/utils/src/glob.ts +0 -1
- package/core/utils/src/guards.ts +0 -39
- package/core/utils/src/hash.ts +0 -26
- package/core/utils/src/helpers.ts +0 -187
- package/core/utils/src/index.ts +0 -24
- package/core/utils/src/macroable.ts +0 -1
- package/core/utils/src/math.ts +0 -30
- package/core/utils/src/p.ts +0 -119
- package/core/utils/src/promise.ts +0 -117
- package/core/utils/src/regex.ts +0 -2
- package/core/utils/src/retry.ts +0 -33
- package/core/utils/src/sleep.ts +0 -60
- package/core/utils/src/throttle.ts +0 -44
- package/core/utils/src/vendors.ts +0 -258
- package/core/utils/src/versions.ts +0 -6
- package/core/utils/tests/example.test.ts +0 -5
- package/core/utils/tsconfig.json +0 -3
- package/core/validation/README.md +0 -53
- package/core/validation/build.ts +0 -5
- package/core/validation/dist/index.js +0 -187
- package/core/validation/package.json +0 -64
- package/core/validation/src/index.ts +0 -4
- package/core/validation/src/is.ts +0 -111
- package/core/validation/src/rules.ts +0 -126
- package/core/validation/src/types/index.ts +0 -7
- package/core/validation/src/types/money.ts +0 -17
- package/core/validation/src/validate.ts +0 -33
- package/core/validation/tests/example.test.ts +0 -5
- package/core/validation/tsconfig.json +0 -3
- package/core/vite/README.md +0 -59
- package/core/vite/build.ts +0 -9
- package/core/vite/dist/index.js +0 -644
- package/core/vite/package.json +0 -122
- package/core/vite/src/api.ts +0 -18
- package/core/vite/src/components.ts +0 -79
- package/core/vite/src/dashboard.ts +0 -100
- package/core/vite/src/desktop.ts +0 -3
- package/core/vite/src/example-vue.ts +0 -20
- package/core/vite/src/example-wc.ts +0 -24
- package/core/vite/src/functions.ts +0 -54
- package/core/vite/src/index.ts +0 -18
- package/core/vite/src/plugin/auto-imports.ts +0 -39
- package/core/vite/src/plugin/components.ts +0 -17
- package/core/vite/src/plugin/css-engine.ts +0 -18
- package/core/vite/src/plugin/devtools.ts +0 -1
- package/core/vite/src/plugin/docs.ts +0 -18
- package/core/vite/src/plugin/fonts.ts +0 -6
- package/core/vite/src/plugin/i18n.ts +0 -13
- package/core/vite/src/plugin/inspect.ts +0 -6
- package/core/vite/src/plugin/layouts.ts +0 -17
- package/core/vite/src/plugin/markdown.ts +0 -26
- package/core/vite/src/plugin/pages.ts +0 -34
- package/core/vite/src/plugin/presets.ts +0 -17
- package/core/vite/src/plugin/pwa.ts +0 -33
- package/core/vite/src/plugin/router.ts +0 -17
- package/core/vite/src/plugin/stacks.ts +0 -150
- package/core/vite/src/plugin/ui-engine.ts +0 -19
- package/core/vite/src/plugins.ts +0 -12
- package/core/vite/src/system-tray.ts +0 -100
- package/core/vite/src/views.ts +0 -97
- package/core/vite/src/web-components.ts +0 -67
- package/core/vite/tests/example.test.ts +0 -5
- package/core/vite/tsconfig.json +0 -3
- package/core/web-types.json +0 -67
- package/core/whois/README.md +0 -55
- package/core/whois/build.ts +0 -8
- package/core/whois/dist/index.js +0 -600
- package/core/whois/package.json +0 -61
- package/core/whois/src/index.ts +0 -499
- package/core/whois/src/parameters.ts +0 -4
- package/core/whois/src/servers.ts +0 -318
- package/core/whois/src/test.ts +0 -5
- package/core/whois/tests/example.test.ts +0 -5
- package/core/whois/tsconfig.json +0 -3
- package/core/x-ray/README.md +0 -55
- package/core/x-ray/index.html +0 -13
- package/core/x-ray/package.json +0 -53
- package/core/x-ray/routes/index.ts +0 -19
- package/core/x-ray/src/client.ts +0 -14
- package/core/x-ray/src/desktop/api/nitro.config.ts +0 -19
- package/core/x-ray/src/desktop/api/routes/api/logs.ts +0 -7
- package/core/x-ray/src/desktop/api/routes/api/store-logs.ts +0 -22
- package/core/x-ray/src/desktop/api/src/types.ts +0 -7
- package/core/x-ray/src/desktop/api/storage/index.ts +0 -7
- package/core/x-ray/src/desktop/app.stx +0 -377
- package/core/x-ray/src/desktop/functions/http.ts +0 -26
- package/core/x-ray/src/desktop/functions/types.ts +0 -7
- package/core/x-ray/src/desktop/main.ts +0 -8
- package/core/x-ray/src/desktop/modules/counter/mod.stx +0 -44
- package/core/x-ray/src/desktop/modules/fetcher/mod.stx +0 -63
- package/core/x-ray/src/desktop/plugins/unified/unified-app.ts +0 -5
- package/core/x-ray/src/desktop/plugins/unified/unified-styles.scss +0 -0
- package/core/x-ray/src/desktop/services/http.ts +0 -45
- package/core/x-ray/src/desktop/styles/app.scss +0 -0
- package/core/x-ray/src/http.ts +0 -26
- package/core/x-ray/src/index.ts +0 -42
- package/core/x-ray/src/ray.config.ts +0 -27
- package/core/x-ray/src/types.ts +0 -8
- package/core/x-ray/tests/example.test.ts +0 -5
- package/core/x-ray/tsconfig.json +0 -3
- package/ide/dictionary.txt +0 -333
- package/ide/jetbrains/.fleet/settings.json +0 -4
- package/ide/jetbrains/.idea/.name +0 -1
- package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/ide/jetbrains/.idea/jsLinters/eslint.xml +0 -7
- package/ide/jetbrains/.idea/modules.xml +0 -8
- package/ide/jetbrains/.idea/stacks.iml +0 -22
- package/ide/jetbrains/.idea/vcs.xml +0 -6
- package/ide/jetbrains/.idea/webResources.xml +0 -14
- package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
- package/ide/jetbrains/installed.txt +0 -4
- package/ide/jetbrains/options/github-copilot.xml +0 -5
- package/ide/jetbrains/options/nodejs.xml +0 -7
- package/ide/jetbrains/options/templates.xml +0 -124
- package/ide/jetbrains/templates/JavaScript.xml +0 -6
- package/ide/jetbrains/templates/Stacks.xml +0 -8
- package/ide/vscode/.vscode/README.md +0 -23
- package/ide/vscode/.vscode/extensions.json +0 -5
- package/ide/vscode/.vscode/settings.json +0 -135
- package/ide/vscode/.vscode/stacks.code-snippets +0 -182
- package/ide/vscode/LICENSE.md +0 -21
- package/ide/vscode/README.md +0 -37
- package/ide/vscode/logo.png +0 -0
- package/ide/vscode/package.json +0 -63
- package/stubs/.gitkeep +0 -0
- package/stubs/TODO.md +0 -18
- package/vcs/github/CODE_OF_CONDUCT.md +0 -83
- package/vcs/github/CONTRIBUTING.md +0 -188
- package/vcs/github/EXPLANATIONS.md +0 -41
- package/vcs/github/FUNDING.yml +0 -1
- package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +0 -49
- package/vcs/github/ISSUE_TEMPLATE/config.yml +0 -10
- package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +0 -44
- package/vcs/github/SECURITY.md +0 -70
- package/vcs/github/renovate.json +0 -5
- package/vcs/github/stale.yml +0 -14
- package/vcs/github/workflows/README.md +0 -16
- package/vcs/github/workflows/ci.yml +0 -174
- package/vcs/github/workflows/export-size.yml +0 -23
- package/vcs/github/workflows/labeler.yml +0 -13
- package/vcs/github/workflows/release.yml +0 -69
- package/{core/README.md → README.md} +0 -0
- package/{core/buddy → buddy}/README.md +0 -0
- package/{core/buddy → buddy}/art/social.jpg +0 -0
- package/{core/buddy → buddy}/bin/cli.ts +0 -0
- package/{core/buddy/dist/chunk-0455e53fab4244b1.js → buddy/dist/chunk-970e033f764e29fc.js} +0 -0
- package/{core/buddy → buddy}/src/commands/build.ts +0 -0
- package/{core/buddy → buddy}/src/commands/changelog.ts +0 -0
- package/{core/buddy → buddy}/src/commands/clean.ts +0 -0
- package/{core/buddy → buddy}/src/commands/cloud.ts +0 -0
- package/{core/buddy → buddy}/src/commands/configure.ts +0 -0
- package/{core/buddy → buddy}/src/commands/create.ts +0 -0
- package/{core/buddy → buddy}/src/commands/dns.ts +0 -0
- package/{core/buddy → buddy}/src/commands/domains.ts +0 -0
- package/{core/buddy → buddy}/src/commands/fresh.ts +0 -0
- package/{core/buddy → buddy}/src/commands/generate.ts +0 -0
- package/{core/buddy → buddy}/src/commands/http.ts +0 -0
- package/{core/buddy → buddy}/src/commands/install.ts +0 -0
- package/{core/buddy → buddy}/src/commands/key.ts +1 -1
- /package/{core/buddy → buddy}/src/commands/lint.ts +0 -0
- /package/{core/buddy → buddy}/src/commands/migrate.ts +0 -0
- /package/{core/buddy → buddy}/src/commands/release.ts +0 -0
- /package/{core/buddy → buddy}/src/commands/seed.ts +0 -0
- /package/{core/buddy → buddy}/src/commands/test.ts +0 -0
- /package/{core/buddy → buddy}/src/commands/tinker.ts +0 -0
- /package/{core/buddy → buddy}/src/commands/upgrade.ts +0 -0
- /package/{core/buddy → buddy}/src/commands/version.ts +0 -0
- /package/{core/buddy → buddy}/src/custom-cli.ts +0 -0
- /package/{core/buddy → buddy}/src/index.ts +0 -0
- /package/{core/actions → buddy}/tsconfig.json +0 -0
|
@@ -1,2762 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __export = (target, all) => {
|
|
4
|
-
for (var name in all)
|
|
5
|
-
__defProp(target, name, {
|
|
6
|
-
get: all[name],
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
set: (newValue) => all[name] = () => newValue
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
13
|
-
|
|
14
|
-
// ../../../../node_modules/js-yaml/dist/js-yaml.mjs
|
|
15
|
-
var exports_js_yaml = {};
|
|
16
|
-
__export(exports_js_yaml, {
|
|
17
|
-
types: () => {
|
|
18
|
-
{
|
|
19
|
-
return types;
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
safeLoadAll: () => {
|
|
23
|
-
{
|
|
24
|
-
return safeLoadAll;
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
safeLoad: () => {
|
|
28
|
-
{
|
|
29
|
-
return safeLoad;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
safeDump: () => {
|
|
33
|
-
{
|
|
34
|
-
return safeDump;
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
loadAll: () => {
|
|
38
|
-
{
|
|
39
|
-
return loadAll;
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
load: () => {
|
|
43
|
-
{
|
|
44
|
-
return load;
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
dump: () => {
|
|
48
|
-
{
|
|
49
|
-
return dump;
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
default: () => {
|
|
53
|
-
{
|
|
54
|
-
return js_yaml_default;
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
YAMLException: () => {
|
|
58
|
-
{
|
|
59
|
-
return YAMLException;
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
Type: () => {
|
|
63
|
-
{
|
|
64
|
-
return Type;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
Schema: () => {
|
|
68
|
-
{
|
|
69
|
-
return Schema;
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
JSON_SCHEMA: () => {
|
|
73
|
-
{
|
|
74
|
-
return JSON_SCHEMA;
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
FAILSAFE_SCHEMA: () => {
|
|
78
|
-
{
|
|
79
|
-
return FAILSAFE_SCHEMA;
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
DEFAULT_SCHEMA: () => {
|
|
83
|
-
{
|
|
84
|
-
return DEFAULT_SCHEMA;
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
CORE_SCHEMA: () => {
|
|
88
|
-
{
|
|
89
|
-
return CORE_SCHEMA;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
var isNothing, isObject, toArray, extend, repeat, isNegativeZero, formatError, YAMLException$1, getLine, padStart, makeSnippet, compileStyleAliases, Type$1, compileList, compileMap, Schema$1, resolveYamlNull, constructYamlNull, isNull, resolveYamlBoolean, constructYamlBoolean, isBoolean, isHexCode, isOctCode, isDecCode, resolveYamlInteger, constructYamlInteger, isInteger, resolveYamlFloat, constructYamlFloat, representYamlFloat, isFloat, resolveYamlTimestamp, constructYamlTimestamp, representYamlTimestamp, resolveYamlMerge, resolveYamlBinary, constructYamlBinary, representYamlBinary, isBinary, resolveYamlOmap, constructYamlOmap, resolveYamlPairs, constructYamlPairs, resolveYamlSet, constructYamlSet, _class, is_EOL, is_WHITE_SPACE, is_WS_OR_EOL, is_FLOW_INDICATOR, fromHexCode, escapedHexLen, fromDecimalCode, simpleEscapeSequence, charFromCodepoint, State$1, generateError, throwError, throwWarning, captureSegment, mergeMappings, storeMappingPair, readLineBreak, skipSeparationSpace, testDocumentSeparator, writeFoldedLines, readPlainScalar, readSingleQuotedScalar, readDoubleQuotedScalar, readFlowCollection, readBlockScalar, readBlockSequence, readBlockMapping, readTagProperty, readAnchorProperty, readAlias, composeNode, readDocument, loadDocuments, loadAll$1, load$1, compileStyleMap, encodeHex, State, indentString, generateNextLine, testImplicitResolving, isWhitespace, isPrintable, isNsCharOrWhitespace, isPlainSafe, isPlainSafeFirst, isPlainSafeLast, codePointAt, needIndentIndicator, chooseScalarStyle, writeScalar, blockHeader, dropEndingNewline, foldString, foldLine, escapeString, writeFlowSequence, writeBlockSequence, writeFlowMapping, writeBlockMapping, detectType, writeNode, getDuplicateReferences, inspectNode, dump$1, renamed, isNothing_1, isObject_1, toArray_1, repeat_1, isNegativeZero_1, extend_1, common, exception, snippet, TYPE_CONSTRUCTOR_OPTIONS, YAML_NODE_KINDS, type, schema, str, seq, map, failsafe, _null, bool, int, YAML_FLOAT_PATTERN, SCIENTIFIC_WITHOUT_DOT, float, json, core, YAML_DATE_REGEXP, YAML_TIMESTAMP_REGEXP, timestamp, merge, BASE64_MAP, binary, _hasOwnProperty$3, _toString$2, omap, _toString$1, pairs, _hasOwnProperty$2, set, _default, _hasOwnProperty$1, CONTEXT_FLOW_IN, CONTEXT_FLOW_OUT, CONTEXT_BLOCK_IN, CONTEXT_BLOCK_OUT, CHOMPING_CLIP, CHOMPING_STRIP, CHOMPING_KEEP, PATTERN_NON_PRINTABLE, PATTERN_NON_ASCII_LINE_BREAKS, PATTERN_FLOW_INDICATORS, PATTERN_TAG_HANDLE, PATTERN_TAG_URI, simpleEscapeCheck, simpleEscapeMap, i, directiveHandlers, loadAll_1, load_1, loader, _toString, _hasOwnProperty, CHAR_BOM, CHAR_TAB, CHAR_LINE_FEED, CHAR_CARRIAGE_RETURN, CHAR_SPACE, CHAR_EXCLAMATION, CHAR_DOUBLE_QUOTE, CHAR_SHARP, CHAR_PERCENT, CHAR_AMPERSAND, CHAR_SINGLE_QUOTE, CHAR_ASTERISK, CHAR_COMMA, CHAR_MINUS, CHAR_COLON, CHAR_EQUALS, CHAR_GREATER_THAN, CHAR_QUESTION, CHAR_COMMERCIAL_AT, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_GRAVE_ACCENT, CHAR_LEFT_CURLY_BRACKET, CHAR_VERTICAL_LINE, CHAR_RIGHT_CURLY_BRACKET, ESCAPE_SEQUENCES, DEPRECATED_BOOLEANS_SYNTAX, DEPRECATED_BASE60_SYNTAX, QUOTING_TYPE_SINGLE, QUOTING_TYPE_DOUBLE, STYLE_PLAIN, STYLE_SINGLE, STYLE_LITERAL, STYLE_FOLDED, STYLE_DOUBLE, dump_1, dumper, Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump, jsYaml, js_yaml_default;
|
|
94
|
-
var init_js_yaml = __esm(() => {
|
|
95
|
-
isNothing = function(subject) {
|
|
96
|
-
return typeof subject === "undefined" || subject === null;
|
|
97
|
-
};
|
|
98
|
-
isObject = function(subject) {
|
|
99
|
-
return typeof subject === "object" && subject !== null;
|
|
100
|
-
};
|
|
101
|
-
toArray = function(sequence) {
|
|
102
|
-
if (Array.isArray(sequence))
|
|
103
|
-
return sequence;
|
|
104
|
-
else if (isNothing(sequence))
|
|
105
|
-
return [];
|
|
106
|
-
return [sequence];
|
|
107
|
-
};
|
|
108
|
-
extend = function(target, source) {
|
|
109
|
-
var index, length, key, sourceKeys;
|
|
110
|
-
if (source) {
|
|
111
|
-
sourceKeys = Object.keys(source);
|
|
112
|
-
for (index = 0, length = sourceKeys.length;index < length; index += 1) {
|
|
113
|
-
key = sourceKeys[index];
|
|
114
|
-
target[key] = source[key];
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return target;
|
|
118
|
-
};
|
|
119
|
-
repeat = function(string, count) {
|
|
120
|
-
var result = "", cycle;
|
|
121
|
-
for (cycle = 0;cycle < count; cycle += 1) {
|
|
122
|
-
result += string;
|
|
123
|
-
}
|
|
124
|
-
return result;
|
|
125
|
-
};
|
|
126
|
-
isNegativeZero = function(number) {
|
|
127
|
-
return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
|
|
128
|
-
};
|
|
129
|
-
formatError = function(exception, compact) {
|
|
130
|
-
var where = "", message = exception.reason || "(unknown reason)";
|
|
131
|
-
if (!exception.mark)
|
|
132
|
-
return message;
|
|
133
|
-
if (exception.mark.name) {
|
|
134
|
-
where += 'in "' + exception.mark.name + '" ';
|
|
135
|
-
}
|
|
136
|
-
where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")";
|
|
137
|
-
if (!compact && exception.mark.snippet) {
|
|
138
|
-
where += "\n\n" + exception.mark.snippet;
|
|
139
|
-
}
|
|
140
|
-
return message + " " + where;
|
|
141
|
-
};
|
|
142
|
-
YAMLException$1 = function(reason, mark) {
|
|
143
|
-
Error.call(this);
|
|
144
|
-
this.name = "YAMLException";
|
|
145
|
-
this.reason = reason;
|
|
146
|
-
this.mark = mark;
|
|
147
|
-
this.message = formatError(this, false);
|
|
148
|
-
if (Error.captureStackTrace) {
|
|
149
|
-
Error.captureStackTrace(this, this.constructor);
|
|
150
|
-
} else {
|
|
151
|
-
this.stack = new Error().stack || "";
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
getLine = function(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
155
|
-
var head = "";
|
|
156
|
-
var tail = "";
|
|
157
|
-
var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
|
|
158
|
-
if (position - lineStart > maxHalfLength) {
|
|
159
|
-
head = " ... ";
|
|
160
|
-
lineStart = position - maxHalfLength + head.length;
|
|
161
|
-
}
|
|
162
|
-
if (lineEnd - position > maxHalfLength) {
|
|
163
|
-
tail = " ...";
|
|
164
|
-
lineEnd = position + maxHalfLength - tail.length;
|
|
165
|
-
}
|
|
166
|
-
return {
|
|
167
|
-
str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail,
|
|
168
|
-
pos: position - lineStart + head.length
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
padStart = function(string, max) {
|
|
172
|
-
return common.repeat(" ", max - string.length) + string;
|
|
173
|
-
};
|
|
174
|
-
makeSnippet = function(mark, options) {
|
|
175
|
-
options = Object.create(options || null);
|
|
176
|
-
if (!mark.buffer)
|
|
177
|
-
return null;
|
|
178
|
-
if (!options.maxLength)
|
|
179
|
-
options.maxLength = 79;
|
|
180
|
-
if (typeof options.indent !== "number")
|
|
181
|
-
options.indent = 1;
|
|
182
|
-
if (typeof options.linesBefore !== "number")
|
|
183
|
-
options.linesBefore = 3;
|
|
184
|
-
if (typeof options.linesAfter !== "number")
|
|
185
|
-
options.linesAfter = 2;
|
|
186
|
-
var re = /\r?\n|\r|\0/g;
|
|
187
|
-
var lineStarts = [0];
|
|
188
|
-
var lineEnds = [];
|
|
189
|
-
var match;
|
|
190
|
-
var foundLineNo = -1;
|
|
191
|
-
while (match = re.exec(mark.buffer)) {
|
|
192
|
-
lineEnds.push(match.index);
|
|
193
|
-
lineStarts.push(match.index + match[0].length);
|
|
194
|
-
if (mark.position <= match.index && foundLineNo < 0) {
|
|
195
|
-
foundLineNo = lineStarts.length - 2;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
if (foundLineNo < 0)
|
|
199
|
-
foundLineNo = lineStarts.length - 1;
|
|
200
|
-
var result = "", i, line;
|
|
201
|
-
var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
|
|
202
|
-
var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
|
|
203
|
-
for (i = 1;i <= options.linesBefore; i++) {
|
|
204
|
-
if (foundLineNo - i < 0)
|
|
205
|
-
break;
|
|
206
|
-
line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);
|
|
207
|
-
result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result;
|
|
208
|
-
}
|
|
209
|
-
line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
|
|
210
|
-
result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
|
|
211
|
-
result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
|
|
212
|
-
for (i = 1;i <= options.linesAfter; i++) {
|
|
213
|
-
if (foundLineNo + i >= lineEnds.length)
|
|
214
|
-
break;
|
|
215
|
-
line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);
|
|
216
|
-
result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n";
|
|
217
|
-
}
|
|
218
|
-
return result.replace(/\n$/, "");
|
|
219
|
-
};
|
|
220
|
-
compileStyleAliases = function(map) {
|
|
221
|
-
var result = {};
|
|
222
|
-
if (map !== null) {
|
|
223
|
-
Object.keys(map).forEach(function(style) {
|
|
224
|
-
map[style].forEach(function(alias) {
|
|
225
|
-
result[String(alias)] = style;
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
return result;
|
|
230
|
-
};
|
|
231
|
-
Type$1 = function(tag, options) {
|
|
232
|
-
options = options || {};
|
|
233
|
-
Object.keys(options).forEach(function(name) {
|
|
234
|
-
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
|
|
235
|
-
throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
this.options = options;
|
|
239
|
-
this.tag = tag;
|
|
240
|
-
this.kind = options["kind"] || null;
|
|
241
|
-
this.resolve = options["resolve"] || function() {
|
|
242
|
-
return true;
|
|
243
|
-
};
|
|
244
|
-
this.construct = options["construct"] || function(data) {
|
|
245
|
-
return data;
|
|
246
|
-
};
|
|
247
|
-
this.instanceOf = options["instanceOf"] || null;
|
|
248
|
-
this.predicate = options["predicate"] || null;
|
|
249
|
-
this.represent = options["represent"] || null;
|
|
250
|
-
this.representName = options["representName"] || null;
|
|
251
|
-
this.defaultStyle = options["defaultStyle"] || null;
|
|
252
|
-
this.multi = options["multi"] || false;
|
|
253
|
-
this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
|
|
254
|
-
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
|
|
255
|
-
throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
compileList = function(schema, name) {
|
|
259
|
-
var result = [];
|
|
260
|
-
schema[name].forEach(function(currentType) {
|
|
261
|
-
var newIndex = result.length;
|
|
262
|
-
result.forEach(function(previousType, previousIndex) {
|
|
263
|
-
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
|
|
264
|
-
newIndex = previousIndex;
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
result[newIndex] = currentType;
|
|
268
|
-
});
|
|
269
|
-
return result;
|
|
270
|
-
};
|
|
271
|
-
compileMap = function() {
|
|
272
|
-
var result = {
|
|
273
|
-
scalar: {},
|
|
274
|
-
sequence: {},
|
|
275
|
-
mapping: {},
|
|
276
|
-
fallback: {},
|
|
277
|
-
multi: {
|
|
278
|
-
scalar: [],
|
|
279
|
-
sequence: [],
|
|
280
|
-
mapping: [],
|
|
281
|
-
fallback: []
|
|
282
|
-
}
|
|
283
|
-
}, index, length;
|
|
284
|
-
function collectType(type) {
|
|
285
|
-
if (type.multi) {
|
|
286
|
-
result.multi[type.kind].push(type);
|
|
287
|
-
result.multi["fallback"].push(type);
|
|
288
|
-
} else {
|
|
289
|
-
result[type.kind][type.tag] = result["fallback"][type.tag] = type;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
for (index = 0, length = arguments.length;index < length; index += 1) {
|
|
293
|
-
arguments[index].forEach(collectType);
|
|
294
|
-
}
|
|
295
|
-
return result;
|
|
296
|
-
};
|
|
297
|
-
Schema$1 = function(definition) {
|
|
298
|
-
return this.extend(definition);
|
|
299
|
-
};
|
|
300
|
-
resolveYamlNull = function(data) {
|
|
301
|
-
if (data === null)
|
|
302
|
-
return true;
|
|
303
|
-
var max = data.length;
|
|
304
|
-
return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
|
|
305
|
-
};
|
|
306
|
-
constructYamlNull = function() {
|
|
307
|
-
return null;
|
|
308
|
-
};
|
|
309
|
-
isNull = function(object) {
|
|
310
|
-
return object === null;
|
|
311
|
-
};
|
|
312
|
-
resolveYamlBoolean = function(data) {
|
|
313
|
-
if (data === null)
|
|
314
|
-
return false;
|
|
315
|
-
var max = data.length;
|
|
316
|
-
return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
|
|
317
|
-
};
|
|
318
|
-
constructYamlBoolean = function(data) {
|
|
319
|
-
return data === "true" || data === "True" || data === "TRUE";
|
|
320
|
-
};
|
|
321
|
-
isBoolean = function(object) {
|
|
322
|
-
return Object.prototype.toString.call(object) === "[object Boolean]";
|
|
323
|
-
};
|
|
324
|
-
isHexCode = function(c) {
|
|
325
|
-
return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
|
|
326
|
-
};
|
|
327
|
-
isOctCode = function(c) {
|
|
328
|
-
return 48 <= c && c <= 55;
|
|
329
|
-
};
|
|
330
|
-
isDecCode = function(c) {
|
|
331
|
-
return 48 <= c && c <= 57;
|
|
332
|
-
};
|
|
333
|
-
resolveYamlInteger = function(data) {
|
|
334
|
-
if (data === null)
|
|
335
|
-
return false;
|
|
336
|
-
var max = data.length, index = 0, hasDigits = false, ch;
|
|
337
|
-
if (!max)
|
|
338
|
-
return false;
|
|
339
|
-
ch = data[index];
|
|
340
|
-
if (ch === "-" || ch === "+") {
|
|
341
|
-
ch = data[++index];
|
|
342
|
-
}
|
|
343
|
-
if (ch === "0") {
|
|
344
|
-
if (index + 1 === max)
|
|
345
|
-
return true;
|
|
346
|
-
ch = data[++index];
|
|
347
|
-
if (ch === "b") {
|
|
348
|
-
index++;
|
|
349
|
-
for (;index < max; index++) {
|
|
350
|
-
ch = data[index];
|
|
351
|
-
if (ch === "_")
|
|
352
|
-
continue;
|
|
353
|
-
if (ch !== "0" && ch !== "1")
|
|
354
|
-
return false;
|
|
355
|
-
hasDigits = true;
|
|
356
|
-
}
|
|
357
|
-
return hasDigits && ch !== "_";
|
|
358
|
-
}
|
|
359
|
-
if (ch === "x") {
|
|
360
|
-
index++;
|
|
361
|
-
for (;index < max; index++) {
|
|
362
|
-
ch = data[index];
|
|
363
|
-
if (ch === "_")
|
|
364
|
-
continue;
|
|
365
|
-
if (!isHexCode(data.charCodeAt(index)))
|
|
366
|
-
return false;
|
|
367
|
-
hasDigits = true;
|
|
368
|
-
}
|
|
369
|
-
return hasDigits && ch !== "_";
|
|
370
|
-
}
|
|
371
|
-
if (ch === "o") {
|
|
372
|
-
index++;
|
|
373
|
-
for (;index < max; index++) {
|
|
374
|
-
ch = data[index];
|
|
375
|
-
if (ch === "_")
|
|
376
|
-
continue;
|
|
377
|
-
if (!isOctCode(data.charCodeAt(index)))
|
|
378
|
-
return false;
|
|
379
|
-
hasDigits = true;
|
|
380
|
-
}
|
|
381
|
-
return hasDigits && ch !== "_";
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (ch === "_")
|
|
385
|
-
return false;
|
|
386
|
-
for (;index < max; index++) {
|
|
387
|
-
ch = data[index];
|
|
388
|
-
if (ch === "_")
|
|
389
|
-
continue;
|
|
390
|
-
if (!isDecCode(data.charCodeAt(index))) {
|
|
391
|
-
return false;
|
|
392
|
-
}
|
|
393
|
-
hasDigits = true;
|
|
394
|
-
}
|
|
395
|
-
if (!hasDigits || ch === "_")
|
|
396
|
-
return false;
|
|
397
|
-
return true;
|
|
398
|
-
};
|
|
399
|
-
constructYamlInteger = function(data) {
|
|
400
|
-
var value = data, sign = 1, ch;
|
|
401
|
-
if (value.indexOf("_") !== -1) {
|
|
402
|
-
value = value.replace(/_/g, "");
|
|
403
|
-
}
|
|
404
|
-
ch = value[0];
|
|
405
|
-
if (ch === "-" || ch === "+") {
|
|
406
|
-
if (ch === "-")
|
|
407
|
-
sign = -1;
|
|
408
|
-
value = value.slice(1);
|
|
409
|
-
ch = value[0];
|
|
410
|
-
}
|
|
411
|
-
if (value === "0")
|
|
412
|
-
return 0;
|
|
413
|
-
if (ch === "0") {
|
|
414
|
-
if (value[1] === "b")
|
|
415
|
-
return sign * parseInt(value.slice(2), 2);
|
|
416
|
-
if (value[1] === "x")
|
|
417
|
-
return sign * parseInt(value.slice(2), 16);
|
|
418
|
-
if (value[1] === "o")
|
|
419
|
-
return sign * parseInt(value.slice(2), 8);
|
|
420
|
-
}
|
|
421
|
-
return sign * parseInt(value, 10);
|
|
422
|
-
};
|
|
423
|
-
isInteger = function(object) {
|
|
424
|
-
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
|
|
425
|
-
};
|
|
426
|
-
resolveYamlFloat = function(data) {
|
|
427
|
-
if (data === null)
|
|
428
|
-
return false;
|
|
429
|
-
if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") {
|
|
430
|
-
return false;
|
|
431
|
-
}
|
|
432
|
-
return true;
|
|
433
|
-
};
|
|
434
|
-
constructYamlFloat = function(data) {
|
|
435
|
-
var value, sign;
|
|
436
|
-
value = data.replace(/_/g, "").toLowerCase();
|
|
437
|
-
sign = value[0] === "-" ? -1 : 1;
|
|
438
|
-
if ("+-".indexOf(value[0]) >= 0) {
|
|
439
|
-
value = value.slice(1);
|
|
440
|
-
}
|
|
441
|
-
if (value === ".inf") {
|
|
442
|
-
return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
443
|
-
} else if (value === ".nan") {
|
|
444
|
-
return NaN;
|
|
445
|
-
}
|
|
446
|
-
return sign * parseFloat(value, 10);
|
|
447
|
-
};
|
|
448
|
-
representYamlFloat = function(object, style) {
|
|
449
|
-
var res;
|
|
450
|
-
if (isNaN(object)) {
|
|
451
|
-
switch (style) {
|
|
452
|
-
case "lowercase":
|
|
453
|
-
return ".nan";
|
|
454
|
-
case "uppercase":
|
|
455
|
-
return ".NAN";
|
|
456
|
-
case "camelcase":
|
|
457
|
-
return ".NaN";
|
|
458
|
-
}
|
|
459
|
-
} else if (Number.POSITIVE_INFINITY === object) {
|
|
460
|
-
switch (style) {
|
|
461
|
-
case "lowercase":
|
|
462
|
-
return ".inf";
|
|
463
|
-
case "uppercase":
|
|
464
|
-
return ".INF";
|
|
465
|
-
case "camelcase":
|
|
466
|
-
return ".Inf";
|
|
467
|
-
}
|
|
468
|
-
} else if (Number.NEGATIVE_INFINITY === object) {
|
|
469
|
-
switch (style) {
|
|
470
|
-
case "lowercase":
|
|
471
|
-
return "-.inf";
|
|
472
|
-
case "uppercase":
|
|
473
|
-
return "-.INF";
|
|
474
|
-
case "camelcase":
|
|
475
|
-
return "-.Inf";
|
|
476
|
-
}
|
|
477
|
-
} else if (common.isNegativeZero(object)) {
|
|
478
|
-
return "-0.0";
|
|
479
|
-
}
|
|
480
|
-
res = object.toString(10);
|
|
481
|
-
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
|
|
482
|
-
};
|
|
483
|
-
isFloat = function(object) {
|
|
484
|
-
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
|
|
485
|
-
};
|
|
486
|
-
resolveYamlTimestamp = function(data) {
|
|
487
|
-
if (data === null)
|
|
488
|
-
return false;
|
|
489
|
-
if (YAML_DATE_REGEXP.exec(data) !== null)
|
|
490
|
-
return true;
|
|
491
|
-
if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
|
|
492
|
-
return true;
|
|
493
|
-
return false;
|
|
494
|
-
};
|
|
495
|
-
constructYamlTimestamp = function(data) {
|
|
496
|
-
var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
|
|
497
|
-
match = YAML_DATE_REGEXP.exec(data);
|
|
498
|
-
if (match === null)
|
|
499
|
-
match = YAML_TIMESTAMP_REGEXP.exec(data);
|
|
500
|
-
if (match === null)
|
|
501
|
-
throw new Error("Date resolve error");
|
|
502
|
-
year = +match[1];
|
|
503
|
-
month = +match[2] - 1;
|
|
504
|
-
day = +match[3];
|
|
505
|
-
if (!match[4]) {
|
|
506
|
-
return new Date(Date.UTC(year, month, day));
|
|
507
|
-
}
|
|
508
|
-
hour = +match[4];
|
|
509
|
-
minute = +match[5];
|
|
510
|
-
second = +match[6];
|
|
511
|
-
if (match[7]) {
|
|
512
|
-
fraction = match[7].slice(0, 3);
|
|
513
|
-
while (fraction.length < 3) {
|
|
514
|
-
fraction += "0";
|
|
515
|
-
}
|
|
516
|
-
fraction = +fraction;
|
|
517
|
-
}
|
|
518
|
-
if (match[9]) {
|
|
519
|
-
tz_hour = +match[10];
|
|
520
|
-
tz_minute = +(match[11] || 0);
|
|
521
|
-
delta = (tz_hour * 60 + tz_minute) * 60000;
|
|
522
|
-
if (match[9] === "-")
|
|
523
|
-
delta = -delta;
|
|
524
|
-
}
|
|
525
|
-
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
|
526
|
-
if (delta)
|
|
527
|
-
date.setTime(date.getTime() - delta);
|
|
528
|
-
return date;
|
|
529
|
-
};
|
|
530
|
-
representYamlTimestamp = function(object) {
|
|
531
|
-
return object.toISOString();
|
|
532
|
-
};
|
|
533
|
-
resolveYamlMerge = function(data) {
|
|
534
|
-
return data === "<<" || data === null;
|
|
535
|
-
};
|
|
536
|
-
resolveYamlBinary = function(data) {
|
|
537
|
-
if (data === null)
|
|
538
|
-
return false;
|
|
539
|
-
var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
|
|
540
|
-
for (idx = 0;idx < max; idx++) {
|
|
541
|
-
code = map.indexOf(data.charAt(idx));
|
|
542
|
-
if (code > 64)
|
|
543
|
-
continue;
|
|
544
|
-
if (code < 0)
|
|
545
|
-
return false;
|
|
546
|
-
bitlen += 6;
|
|
547
|
-
}
|
|
548
|
-
return bitlen % 8 === 0;
|
|
549
|
-
};
|
|
550
|
-
constructYamlBinary = function(data) {
|
|
551
|
-
var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
|
|
552
|
-
for (idx = 0;idx < max; idx++) {
|
|
553
|
-
if (idx % 4 === 0 && idx) {
|
|
554
|
-
result.push(bits >> 16 & 255);
|
|
555
|
-
result.push(bits >> 8 & 255);
|
|
556
|
-
result.push(bits & 255);
|
|
557
|
-
}
|
|
558
|
-
bits = bits << 6 | map.indexOf(input.charAt(idx));
|
|
559
|
-
}
|
|
560
|
-
tailbits = max % 4 * 6;
|
|
561
|
-
if (tailbits === 0) {
|
|
562
|
-
result.push(bits >> 16 & 255);
|
|
563
|
-
result.push(bits >> 8 & 255);
|
|
564
|
-
result.push(bits & 255);
|
|
565
|
-
} else if (tailbits === 18) {
|
|
566
|
-
result.push(bits >> 10 & 255);
|
|
567
|
-
result.push(bits >> 2 & 255);
|
|
568
|
-
} else if (tailbits === 12) {
|
|
569
|
-
result.push(bits >> 4 & 255);
|
|
570
|
-
}
|
|
571
|
-
return new Uint8Array(result);
|
|
572
|
-
};
|
|
573
|
-
representYamlBinary = function(object) {
|
|
574
|
-
var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
|
|
575
|
-
for (idx = 0;idx < max; idx++) {
|
|
576
|
-
if (idx % 3 === 0 && idx) {
|
|
577
|
-
result += map[bits >> 18 & 63];
|
|
578
|
-
result += map[bits >> 12 & 63];
|
|
579
|
-
result += map[bits >> 6 & 63];
|
|
580
|
-
result += map[bits & 63];
|
|
581
|
-
}
|
|
582
|
-
bits = (bits << 8) + object[idx];
|
|
583
|
-
}
|
|
584
|
-
tail = max % 3;
|
|
585
|
-
if (tail === 0) {
|
|
586
|
-
result += map[bits >> 18 & 63];
|
|
587
|
-
result += map[bits >> 12 & 63];
|
|
588
|
-
result += map[bits >> 6 & 63];
|
|
589
|
-
result += map[bits & 63];
|
|
590
|
-
} else if (tail === 2) {
|
|
591
|
-
result += map[bits >> 10 & 63];
|
|
592
|
-
result += map[bits >> 4 & 63];
|
|
593
|
-
result += map[bits << 2 & 63];
|
|
594
|
-
result += map[64];
|
|
595
|
-
} else if (tail === 1) {
|
|
596
|
-
result += map[bits >> 2 & 63];
|
|
597
|
-
result += map[bits << 4 & 63];
|
|
598
|
-
result += map[64];
|
|
599
|
-
result += map[64];
|
|
600
|
-
}
|
|
601
|
-
return result;
|
|
602
|
-
};
|
|
603
|
-
isBinary = function(obj) {
|
|
604
|
-
return Object.prototype.toString.call(obj) === "[object Uint8Array]";
|
|
605
|
-
};
|
|
606
|
-
resolveYamlOmap = function(data) {
|
|
607
|
-
if (data === null)
|
|
608
|
-
return true;
|
|
609
|
-
var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
|
|
610
|
-
for (index = 0, length = object.length;index < length; index += 1) {
|
|
611
|
-
pair = object[index];
|
|
612
|
-
pairHasKey = false;
|
|
613
|
-
if (_toString$2.call(pair) !== "[object Object]")
|
|
614
|
-
return false;
|
|
615
|
-
for (pairKey in pair) {
|
|
616
|
-
if (_hasOwnProperty$3.call(pair, pairKey)) {
|
|
617
|
-
if (!pairHasKey)
|
|
618
|
-
pairHasKey = true;
|
|
619
|
-
else
|
|
620
|
-
return false;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
if (!pairHasKey)
|
|
624
|
-
return false;
|
|
625
|
-
if (objectKeys.indexOf(pairKey) === -1)
|
|
626
|
-
objectKeys.push(pairKey);
|
|
627
|
-
else
|
|
628
|
-
return false;
|
|
629
|
-
}
|
|
630
|
-
return true;
|
|
631
|
-
};
|
|
632
|
-
constructYamlOmap = function(data) {
|
|
633
|
-
return data !== null ? data : [];
|
|
634
|
-
};
|
|
635
|
-
resolveYamlPairs = function(data) {
|
|
636
|
-
if (data === null)
|
|
637
|
-
return true;
|
|
638
|
-
var index, length, pair, keys, result, object = data;
|
|
639
|
-
result = new Array(object.length);
|
|
640
|
-
for (index = 0, length = object.length;index < length; index += 1) {
|
|
641
|
-
pair = object[index];
|
|
642
|
-
if (_toString$1.call(pair) !== "[object Object]")
|
|
643
|
-
return false;
|
|
644
|
-
keys = Object.keys(pair);
|
|
645
|
-
if (keys.length !== 1)
|
|
646
|
-
return false;
|
|
647
|
-
result[index] = [keys[0], pair[keys[0]]];
|
|
648
|
-
}
|
|
649
|
-
return true;
|
|
650
|
-
};
|
|
651
|
-
constructYamlPairs = function(data) {
|
|
652
|
-
if (data === null)
|
|
653
|
-
return [];
|
|
654
|
-
var index, length, pair, keys, result, object = data;
|
|
655
|
-
result = new Array(object.length);
|
|
656
|
-
for (index = 0, length = object.length;index < length; index += 1) {
|
|
657
|
-
pair = object[index];
|
|
658
|
-
keys = Object.keys(pair);
|
|
659
|
-
result[index] = [keys[0], pair[keys[0]]];
|
|
660
|
-
}
|
|
661
|
-
return result;
|
|
662
|
-
};
|
|
663
|
-
resolveYamlSet = function(data) {
|
|
664
|
-
if (data === null)
|
|
665
|
-
return true;
|
|
666
|
-
var key, object = data;
|
|
667
|
-
for (key in object) {
|
|
668
|
-
if (_hasOwnProperty$2.call(object, key)) {
|
|
669
|
-
if (object[key] !== null)
|
|
670
|
-
return false;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
return true;
|
|
674
|
-
};
|
|
675
|
-
constructYamlSet = function(data) {
|
|
676
|
-
return data !== null ? data : {};
|
|
677
|
-
};
|
|
678
|
-
_class = function(obj) {
|
|
679
|
-
return Object.prototype.toString.call(obj);
|
|
680
|
-
};
|
|
681
|
-
is_EOL = function(c) {
|
|
682
|
-
return c === 10 || c === 13;
|
|
683
|
-
};
|
|
684
|
-
is_WHITE_SPACE = function(c) {
|
|
685
|
-
return c === 9 || c === 32;
|
|
686
|
-
};
|
|
687
|
-
is_WS_OR_EOL = function(c) {
|
|
688
|
-
return c === 9 || c === 32 || c === 10 || c === 13;
|
|
689
|
-
};
|
|
690
|
-
is_FLOW_INDICATOR = function(c) {
|
|
691
|
-
return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
|
|
692
|
-
};
|
|
693
|
-
fromHexCode = function(c) {
|
|
694
|
-
var lc;
|
|
695
|
-
if (48 <= c && c <= 57) {
|
|
696
|
-
return c - 48;
|
|
697
|
-
}
|
|
698
|
-
lc = c | 32;
|
|
699
|
-
if (97 <= lc && lc <= 102) {
|
|
700
|
-
return lc - 97 + 10;
|
|
701
|
-
}
|
|
702
|
-
return -1;
|
|
703
|
-
};
|
|
704
|
-
escapedHexLen = function(c) {
|
|
705
|
-
if (c === 120) {
|
|
706
|
-
return 2;
|
|
707
|
-
}
|
|
708
|
-
if (c === 117) {
|
|
709
|
-
return 4;
|
|
710
|
-
}
|
|
711
|
-
if (c === 85) {
|
|
712
|
-
return 8;
|
|
713
|
-
}
|
|
714
|
-
return 0;
|
|
715
|
-
};
|
|
716
|
-
fromDecimalCode = function(c) {
|
|
717
|
-
if (48 <= c && c <= 57) {
|
|
718
|
-
return c - 48;
|
|
719
|
-
}
|
|
720
|
-
return -1;
|
|
721
|
-
};
|
|
722
|
-
simpleEscapeSequence = function(c) {
|
|
723
|
-
return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? "\t" : c === 9 ? "\t" : c === 110 ? `
|
|
724
|
-
` : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? `\r` : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
|
|
725
|
-
};
|
|
726
|
-
charFromCodepoint = function(c) {
|
|
727
|
-
if (c <= 65535) {
|
|
728
|
-
return String.fromCharCode(c);
|
|
729
|
-
}
|
|
730
|
-
return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
|
|
731
|
-
};
|
|
732
|
-
State$1 = function(input, options) {
|
|
733
|
-
this.input = input;
|
|
734
|
-
this.filename = options["filename"] || null;
|
|
735
|
-
this.schema = options["schema"] || _default;
|
|
736
|
-
this.onWarning = options["onWarning"] || null;
|
|
737
|
-
this.legacy = options["legacy"] || false;
|
|
738
|
-
this.json = options["json"] || false;
|
|
739
|
-
this.listener = options["listener"] || null;
|
|
740
|
-
this.implicitTypes = this.schema.compiledImplicit;
|
|
741
|
-
this.typeMap = this.schema.compiledTypeMap;
|
|
742
|
-
this.length = input.length;
|
|
743
|
-
this.position = 0;
|
|
744
|
-
this.line = 0;
|
|
745
|
-
this.lineStart = 0;
|
|
746
|
-
this.lineIndent = 0;
|
|
747
|
-
this.firstTabInLine = -1;
|
|
748
|
-
this.documents = [];
|
|
749
|
-
};
|
|
750
|
-
generateError = function(state, message) {
|
|
751
|
-
var mark = {
|
|
752
|
-
name: state.filename,
|
|
753
|
-
buffer: state.input.slice(0, -1),
|
|
754
|
-
position: state.position,
|
|
755
|
-
line: state.line,
|
|
756
|
-
column: state.position - state.lineStart
|
|
757
|
-
};
|
|
758
|
-
mark.snippet = snippet(mark);
|
|
759
|
-
return new exception(message, mark);
|
|
760
|
-
};
|
|
761
|
-
throwError = function(state, message) {
|
|
762
|
-
throw generateError(state, message);
|
|
763
|
-
};
|
|
764
|
-
throwWarning = function(state, message) {
|
|
765
|
-
if (state.onWarning) {
|
|
766
|
-
state.onWarning.call(null, generateError(state, message));
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
captureSegment = function(state, start, end, checkJson) {
|
|
770
|
-
var _position, _length, _character, _result;
|
|
771
|
-
if (start < end) {
|
|
772
|
-
_result = state.input.slice(start, end);
|
|
773
|
-
if (checkJson) {
|
|
774
|
-
for (_position = 0, _length = _result.length;_position < _length; _position += 1) {
|
|
775
|
-
_character = _result.charCodeAt(_position);
|
|
776
|
-
if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
|
|
777
|
-
throwError(state, "expected valid JSON character");
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
} else if (PATTERN_NON_PRINTABLE.test(_result)) {
|
|
781
|
-
throwError(state, "the stream contains non-printable characters");
|
|
782
|
-
}
|
|
783
|
-
state.result += _result;
|
|
784
|
-
}
|
|
785
|
-
};
|
|
786
|
-
mergeMappings = function(state, destination, source, overridableKeys) {
|
|
787
|
-
var sourceKeys, key, index, quantity;
|
|
788
|
-
if (!common.isObject(source)) {
|
|
789
|
-
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
790
|
-
}
|
|
791
|
-
sourceKeys = Object.keys(source);
|
|
792
|
-
for (index = 0, quantity = sourceKeys.length;index < quantity; index += 1) {
|
|
793
|
-
key = sourceKeys[index];
|
|
794
|
-
if (!_hasOwnProperty$1.call(destination, key)) {
|
|
795
|
-
destination[key] = source[key];
|
|
796
|
-
overridableKeys[key] = true;
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
};
|
|
800
|
-
storeMappingPair = function(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
|
|
801
|
-
var index, quantity;
|
|
802
|
-
if (Array.isArray(keyNode)) {
|
|
803
|
-
keyNode = Array.prototype.slice.call(keyNode);
|
|
804
|
-
for (index = 0, quantity = keyNode.length;index < quantity; index += 1) {
|
|
805
|
-
if (Array.isArray(keyNode[index])) {
|
|
806
|
-
throwError(state, "nested arrays are not supported inside keys");
|
|
807
|
-
}
|
|
808
|
-
if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
|
|
809
|
-
keyNode[index] = "[object Object]";
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
|
|
814
|
-
keyNode = "[object Object]";
|
|
815
|
-
}
|
|
816
|
-
keyNode = String(keyNode);
|
|
817
|
-
if (_result === null) {
|
|
818
|
-
_result = {};
|
|
819
|
-
}
|
|
820
|
-
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
821
|
-
if (Array.isArray(valueNode)) {
|
|
822
|
-
for (index = 0, quantity = valueNode.length;index < quantity; index += 1) {
|
|
823
|
-
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
824
|
-
}
|
|
825
|
-
} else {
|
|
826
|
-
mergeMappings(state, _result, valueNode, overridableKeys);
|
|
827
|
-
}
|
|
828
|
-
} else {
|
|
829
|
-
if (!state.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) {
|
|
830
|
-
state.line = startLine || state.line;
|
|
831
|
-
state.lineStart = startLineStart || state.lineStart;
|
|
832
|
-
state.position = startPos || state.position;
|
|
833
|
-
throwError(state, "duplicated mapping key");
|
|
834
|
-
}
|
|
835
|
-
if (keyNode === "__proto__") {
|
|
836
|
-
Object.defineProperty(_result, keyNode, {
|
|
837
|
-
configurable: true,
|
|
838
|
-
enumerable: true,
|
|
839
|
-
writable: true,
|
|
840
|
-
value: valueNode
|
|
841
|
-
});
|
|
842
|
-
} else {
|
|
843
|
-
_result[keyNode] = valueNode;
|
|
844
|
-
}
|
|
845
|
-
delete overridableKeys[keyNode];
|
|
846
|
-
}
|
|
847
|
-
return _result;
|
|
848
|
-
};
|
|
849
|
-
readLineBreak = function(state) {
|
|
850
|
-
var ch;
|
|
851
|
-
ch = state.input.charCodeAt(state.position);
|
|
852
|
-
if (ch === 10) {
|
|
853
|
-
state.position++;
|
|
854
|
-
} else if (ch === 13) {
|
|
855
|
-
state.position++;
|
|
856
|
-
if (state.input.charCodeAt(state.position) === 10) {
|
|
857
|
-
state.position++;
|
|
858
|
-
}
|
|
859
|
-
} else {
|
|
860
|
-
throwError(state, "a line break is expected");
|
|
861
|
-
}
|
|
862
|
-
state.line += 1;
|
|
863
|
-
state.lineStart = state.position;
|
|
864
|
-
state.firstTabInLine = -1;
|
|
865
|
-
};
|
|
866
|
-
skipSeparationSpace = function(state, allowComments, checkIndent) {
|
|
867
|
-
var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
|
|
868
|
-
while (ch !== 0) {
|
|
869
|
-
while (is_WHITE_SPACE(ch)) {
|
|
870
|
-
if (ch === 9 && state.firstTabInLine === -1) {
|
|
871
|
-
state.firstTabInLine = state.position;
|
|
872
|
-
}
|
|
873
|
-
ch = state.input.charCodeAt(++state.position);
|
|
874
|
-
}
|
|
875
|
-
if (allowComments && ch === 35) {
|
|
876
|
-
do {
|
|
877
|
-
ch = state.input.charCodeAt(++state.position);
|
|
878
|
-
} while (ch !== 10 && ch !== 13 && ch !== 0);
|
|
879
|
-
}
|
|
880
|
-
if (is_EOL(ch)) {
|
|
881
|
-
readLineBreak(state);
|
|
882
|
-
ch = state.input.charCodeAt(state.position);
|
|
883
|
-
lineBreaks++;
|
|
884
|
-
state.lineIndent = 0;
|
|
885
|
-
while (ch === 32) {
|
|
886
|
-
state.lineIndent++;
|
|
887
|
-
ch = state.input.charCodeAt(++state.position);
|
|
888
|
-
}
|
|
889
|
-
} else {
|
|
890
|
-
break;
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
|
|
894
|
-
throwWarning(state, "deficient indentation");
|
|
895
|
-
}
|
|
896
|
-
return lineBreaks;
|
|
897
|
-
};
|
|
898
|
-
testDocumentSeparator = function(state) {
|
|
899
|
-
var _position = state.position, ch;
|
|
900
|
-
ch = state.input.charCodeAt(_position);
|
|
901
|
-
if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
|
|
902
|
-
_position += 3;
|
|
903
|
-
ch = state.input.charCodeAt(_position);
|
|
904
|
-
if (ch === 0 || is_WS_OR_EOL(ch)) {
|
|
905
|
-
return true;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
return false;
|
|
909
|
-
};
|
|
910
|
-
writeFoldedLines = function(state, count) {
|
|
911
|
-
if (count === 1) {
|
|
912
|
-
state.result += " ";
|
|
913
|
-
} else if (count > 1) {
|
|
914
|
-
state.result += common.repeat("\n", count - 1);
|
|
915
|
-
}
|
|
916
|
-
};
|
|
917
|
-
readPlainScalar = function(state, nodeIndent, withinFlowCollection) {
|
|
918
|
-
var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
|
|
919
|
-
ch = state.input.charCodeAt(state.position);
|
|
920
|
-
if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
|
|
921
|
-
return false;
|
|
922
|
-
}
|
|
923
|
-
if (ch === 63 || ch === 45) {
|
|
924
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
925
|
-
if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
|
|
926
|
-
return false;
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
state.kind = "scalar";
|
|
930
|
-
state.result = "";
|
|
931
|
-
captureStart = captureEnd = state.position;
|
|
932
|
-
hasPendingContent = false;
|
|
933
|
-
while (ch !== 0) {
|
|
934
|
-
if (ch === 58) {
|
|
935
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
936
|
-
if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
|
|
937
|
-
break;
|
|
938
|
-
}
|
|
939
|
-
} else if (ch === 35) {
|
|
940
|
-
preceding = state.input.charCodeAt(state.position - 1);
|
|
941
|
-
if (is_WS_OR_EOL(preceding)) {
|
|
942
|
-
break;
|
|
943
|
-
}
|
|
944
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
|
|
945
|
-
break;
|
|
946
|
-
} else if (is_EOL(ch)) {
|
|
947
|
-
_line = state.line;
|
|
948
|
-
_lineStart = state.lineStart;
|
|
949
|
-
_lineIndent = state.lineIndent;
|
|
950
|
-
skipSeparationSpace(state, false, -1);
|
|
951
|
-
if (state.lineIndent >= nodeIndent) {
|
|
952
|
-
hasPendingContent = true;
|
|
953
|
-
ch = state.input.charCodeAt(state.position);
|
|
954
|
-
continue;
|
|
955
|
-
} else {
|
|
956
|
-
state.position = captureEnd;
|
|
957
|
-
state.line = _line;
|
|
958
|
-
state.lineStart = _lineStart;
|
|
959
|
-
state.lineIndent = _lineIndent;
|
|
960
|
-
break;
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
if (hasPendingContent) {
|
|
964
|
-
captureSegment(state, captureStart, captureEnd, false);
|
|
965
|
-
writeFoldedLines(state, state.line - _line);
|
|
966
|
-
captureStart = captureEnd = state.position;
|
|
967
|
-
hasPendingContent = false;
|
|
968
|
-
}
|
|
969
|
-
if (!is_WHITE_SPACE(ch)) {
|
|
970
|
-
captureEnd = state.position + 1;
|
|
971
|
-
}
|
|
972
|
-
ch = state.input.charCodeAt(++state.position);
|
|
973
|
-
}
|
|
974
|
-
captureSegment(state, captureStart, captureEnd, false);
|
|
975
|
-
if (state.result) {
|
|
976
|
-
return true;
|
|
977
|
-
}
|
|
978
|
-
state.kind = _kind;
|
|
979
|
-
state.result = _result;
|
|
980
|
-
return false;
|
|
981
|
-
};
|
|
982
|
-
readSingleQuotedScalar = function(state, nodeIndent) {
|
|
983
|
-
var ch, captureStart, captureEnd;
|
|
984
|
-
ch = state.input.charCodeAt(state.position);
|
|
985
|
-
if (ch !== 39) {
|
|
986
|
-
return false;
|
|
987
|
-
}
|
|
988
|
-
state.kind = "scalar";
|
|
989
|
-
state.result = "";
|
|
990
|
-
state.position++;
|
|
991
|
-
captureStart = captureEnd = state.position;
|
|
992
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
993
|
-
if (ch === 39) {
|
|
994
|
-
captureSegment(state, captureStart, state.position, true);
|
|
995
|
-
ch = state.input.charCodeAt(++state.position);
|
|
996
|
-
if (ch === 39) {
|
|
997
|
-
captureStart = state.position;
|
|
998
|
-
state.position++;
|
|
999
|
-
captureEnd = state.position;
|
|
1000
|
-
} else {
|
|
1001
|
-
return true;
|
|
1002
|
-
}
|
|
1003
|
-
} else if (is_EOL(ch)) {
|
|
1004
|
-
captureSegment(state, captureStart, captureEnd, true);
|
|
1005
|
-
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
1006
|
-
captureStart = captureEnd = state.position;
|
|
1007
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
1008
|
-
throwError(state, "unexpected end of the document within a single quoted scalar");
|
|
1009
|
-
} else {
|
|
1010
|
-
state.position++;
|
|
1011
|
-
captureEnd = state.position;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
|
1015
|
-
};
|
|
1016
|
-
readDoubleQuotedScalar = function(state, nodeIndent) {
|
|
1017
|
-
var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
|
|
1018
|
-
ch = state.input.charCodeAt(state.position);
|
|
1019
|
-
if (ch !== 34) {
|
|
1020
|
-
return false;
|
|
1021
|
-
}
|
|
1022
|
-
state.kind = "scalar";
|
|
1023
|
-
state.result = "";
|
|
1024
|
-
state.position++;
|
|
1025
|
-
captureStart = captureEnd = state.position;
|
|
1026
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
1027
|
-
if (ch === 34) {
|
|
1028
|
-
captureSegment(state, captureStart, state.position, true);
|
|
1029
|
-
state.position++;
|
|
1030
|
-
return true;
|
|
1031
|
-
} else if (ch === 92) {
|
|
1032
|
-
captureSegment(state, captureStart, state.position, true);
|
|
1033
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1034
|
-
if (is_EOL(ch)) {
|
|
1035
|
-
skipSeparationSpace(state, false, nodeIndent);
|
|
1036
|
-
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
1037
|
-
state.result += simpleEscapeMap[ch];
|
|
1038
|
-
state.position++;
|
|
1039
|
-
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
1040
|
-
hexLength = tmp;
|
|
1041
|
-
hexResult = 0;
|
|
1042
|
-
for (;hexLength > 0; hexLength--) {
|
|
1043
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1044
|
-
if ((tmp = fromHexCode(ch)) >= 0) {
|
|
1045
|
-
hexResult = (hexResult << 4) + tmp;
|
|
1046
|
-
} else {
|
|
1047
|
-
throwError(state, "expected hexadecimal character");
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
state.result += charFromCodepoint(hexResult);
|
|
1051
|
-
state.position++;
|
|
1052
|
-
} else {
|
|
1053
|
-
throwError(state, "unknown escape sequence");
|
|
1054
|
-
}
|
|
1055
|
-
captureStart = captureEnd = state.position;
|
|
1056
|
-
} else if (is_EOL(ch)) {
|
|
1057
|
-
captureSegment(state, captureStart, captureEnd, true);
|
|
1058
|
-
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
1059
|
-
captureStart = captureEnd = state.position;
|
|
1060
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
1061
|
-
throwError(state, "unexpected end of the document within a double quoted scalar");
|
|
1062
|
-
} else {
|
|
1063
|
-
state.position++;
|
|
1064
|
-
captureEnd = state.position;
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
throwError(state, "unexpected end of the stream within a double quoted scalar");
|
|
1068
|
-
};
|
|
1069
|
-
readFlowCollection = function(state, nodeIndent) {
|
|
1070
|
-
var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = Object.create(null), keyNode, keyTag, valueNode, ch;
|
|
1071
|
-
ch = state.input.charCodeAt(state.position);
|
|
1072
|
-
if (ch === 91) {
|
|
1073
|
-
terminator = 93;
|
|
1074
|
-
isMapping = false;
|
|
1075
|
-
_result = [];
|
|
1076
|
-
} else if (ch === 123) {
|
|
1077
|
-
terminator = 125;
|
|
1078
|
-
isMapping = true;
|
|
1079
|
-
_result = {};
|
|
1080
|
-
} else {
|
|
1081
|
-
return false;
|
|
1082
|
-
}
|
|
1083
|
-
if (state.anchor !== null) {
|
|
1084
|
-
state.anchorMap[state.anchor] = _result;
|
|
1085
|
-
}
|
|
1086
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1087
|
-
while (ch !== 0) {
|
|
1088
|
-
skipSeparationSpace(state, true, nodeIndent);
|
|
1089
|
-
ch = state.input.charCodeAt(state.position);
|
|
1090
|
-
if (ch === terminator) {
|
|
1091
|
-
state.position++;
|
|
1092
|
-
state.tag = _tag;
|
|
1093
|
-
state.anchor = _anchor;
|
|
1094
|
-
state.kind = isMapping ? "mapping" : "sequence";
|
|
1095
|
-
state.result = _result;
|
|
1096
|
-
return true;
|
|
1097
|
-
} else if (!readNext) {
|
|
1098
|
-
throwError(state, "missed comma between flow collection entries");
|
|
1099
|
-
} else if (ch === 44) {
|
|
1100
|
-
throwError(state, "expected the node content, but found ','");
|
|
1101
|
-
}
|
|
1102
|
-
keyTag = keyNode = valueNode = null;
|
|
1103
|
-
isPair = isExplicitPair = false;
|
|
1104
|
-
if (ch === 63) {
|
|
1105
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
1106
|
-
if (is_WS_OR_EOL(following)) {
|
|
1107
|
-
isPair = isExplicitPair = true;
|
|
1108
|
-
state.position++;
|
|
1109
|
-
skipSeparationSpace(state, true, nodeIndent);
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
_line = state.line;
|
|
1113
|
-
_lineStart = state.lineStart;
|
|
1114
|
-
_pos = state.position;
|
|
1115
|
-
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
|
1116
|
-
keyTag = state.tag;
|
|
1117
|
-
keyNode = state.result;
|
|
1118
|
-
skipSeparationSpace(state, true, nodeIndent);
|
|
1119
|
-
ch = state.input.charCodeAt(state.position);
|
|
1120
|
-
if ((isExplicitPair || state.line === _line) && ch === 58) {
|
|
1121
|
-
isPair = true;
|
|
1122
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1123
|
-
skipSeparationSpace(state, true, nodeIndent);
|
|
1124
|
-
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
|
1125
|
-
valueNode = state.result;
|
|
1126
|
-
}
|
|
1127
|
-
if (isMapping) {
|
|
1128
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
|
|
1129
|
-
} else if (isPair) {
|
|
1130
|
-
_result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
|
|
1131
|
-
} else {
|
|
1132
|
-
_result.push(keyNode);
|
|
1133
|
-
}
|
|
1134
|
-
skipSeparationSpace(state, true, nodeIndent);
|
|
1135
|
-
ch = state.input.charCodeAt(state.position);
|
|
1136
|
-
if (ch === 44) {
|
|
1137
|
-
readNext = true;
|
|
1138
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1139
|
-
} else {
|
|
1140
|
-
readNext = false;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
throwError(state, "unexpected end of the stream within a flow collection");
|
|
1144
|
-
};
|
|
1145
|
-
readBlockScalar = function(state, nodeIndent) {
|
|
1146
|
-
var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
|
|
1147
|
-
ch = state.input.charCodeAt(state.position);
|
|
1148
|
-
if (ch === 124) {
|
|
1149
|
-
folding = false;
|
|
1150
|
-
} else if (ch === 62) {
|
|
1151
|
-
folding = true;
|
|
1152
|
-
} else {
|
|
1153
|
-
return false;
|
|
1154
|
-
}
|
|
1155
|
-
state.kind = "scalar";
|
|
1156
|
-
state.result = "";
|
|
1157
|
-
while (ch !== 0) {
|
|
1158
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1159
|
-
if (ch === 43 || ch === 45) {
|
|
1160
|
-
if (CHOMPING_CLIP === chomping) {
|
|
1161
|
-
chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
1162
|
-
} else {
|
|
1163
|
-
throwError(state, "repeat of a chomping mode identifier");
|
|
1164
|
-
}
|
|
1165
|
-
} else if ((tmp = fromDecimalCode(ch)) >= 0) {
|
|
1166
|
-
if (tmp === 0) {
|
|
1167
|
-
throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
1168
|
-
} else if (!detectedIndent) {
|
|
1169
|
-
textIndent = nodeIndent + tmp - 1;
|
|
1170
|
-
detectedIndent = true;
|
|
1171
|
-
} else {
|
|
1172
|
-
throwError(state, "repeat of an indentation width identifier");
|
|
1173
|
-
}
|
|
1174
|
-
} else {
|
|
1175
|
-
break;
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
if (is_WHITE_SPACE(ch)) {
|
|
1179
|
-
do {
|
|
1180
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1181
|
-
} while (is_WHITE_SPACE(ch));
|
|
1182
|
-
if (ch === 35) {
|
|
1183
|
-
do {
|
|
1184
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1185
|
-
} while (!is_EOL(ch) && ch !== 0);
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
while (ch !== 0) {
|
|
1189
|
-
readLineBreak(state);
|
|
1190
|
-
state.lineIndent = 0;
|
|
1191
|
-
ch = state.input.charCodeAt(state.position);
|
|
1192
|
-
while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) {
|
|
1193
|
-
state.lineIndent++;
|
|
1194
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1195
|
-
}
|
|
1196
|
-
if (!detectedIndent && state.lineIndent > textIndent) {
|
|
1197
|
-
textIndent = state.lineIndent;
|
|
1198
|
-
}
|
|
1199
|
-
if (is_EOL(ch)) {
|
|
1200
|
-
emptyLines++;
|
|
1201
|
-
continue;
|
|
1202
|
-
}
|
|
1203
|
-
if (state.lineIndent < textIndent) {
|
|
1204
|
-
if (chomping === CHOMPING_KEEP) {
|
|
1205
|
-
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
1206
|
-
} else if (chomping === CHOMPING_CLIP) {
|
|
1207
|
-
if (didReadContent) {
|
|
1208
|
-
state.result += "\n";
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
break;
|
|
1212
|
-
}
|
|
1213
|
-
if (folding) {
|
|
1214
|
-
if (is_WHITE_SPACE(ch)) {
|
|
1215
|
-
atMoreIndented = true;
|
|
1216
|
-
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
1217
|
-
} else if (atMoreIndented) {
|
|
1218
|
-
atMoreIndented = false;
|
|
1219
|
-
state.result += common.repeat("\n", emptyLines + 1);
|
|
1220
|
-
} else if (emptyLines === 0) {
|
|
1221
|
-
if (didReadContent) {
|
|
1222
|
-
state.result += " ";
|
|
1223
|
-
}
|
|
1224
|
-
} else {
|
|
1225
|
-
state.result += common.repeat("\n", emptyLines);
|
|
1226
|
-
}
|
|
1227
|
-
} else {
|
|
1228
|
-
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
1229
|
-
}
|
|
1230
|
-
didReadContent = true;
|
|
1231
|
-
detectedIndent = true;
|
|
1232
|
-
emptyLines = 0;
|
|
1233
|
-
captureStart = state.position;
|
|
1234
|
-
while (!is_EOL(ch) && ch !== 0) {
|
|
1235
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1236
|
-
}
|
|
1237
|
-
captureSegment(state, captureStart, state.position, false);
|
|
1238
|
-
}
|
|
1239
|
-
return true;
|
|
1240
|
-
};
|
|
1241
|
-
readBlockSequence = function(state, nodeIndent) {
|
|
1242
|
-
var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
|
|
1243
|
-
if (state.firstTabInLine !== -1)
|
|
1244
|
-
return false;
|
|
1245
|
-
if (state.anchor !== null) {
|
|
1246
|
-
state.anchorMap[state.anchor] = _result;
|
|
1247
|
-
}
|
|
1248
|
-
ch = state.input.charCodeAt(state.position);
|
|
1249
|
-
while (ch !== 0) {
|
|
1250
|
-
if (state.firstTabInLine !== -1) {
|
|
1251
|
-
state.position = state.firstTabInLine;
|
|
1252
|
-
throwError(state, "tab characters must not be used in indentation");
|
|
1253
|
-
}
|
|
1254
|
-
if (ch !== 45) {
|
|
1255
|
-
break;
|
|
1256
|
-
}
|
|
1257
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
1258
|
-
if (!is_WS_OR_EOL(following)) {
|
|
1259
|
-
break;
|
|
1260
|
-
}
|
|
1261
|
-
detected = true;
|
|
1262
|
-
state.position++;
|
|
1263
|
-
if (skipSeparationSpace(state, true, -1)) {
|
|
1264
|
-
if (state.lineIndent <= nodeIndent) {
|
|
1265
|
-
_result.push(null);
|
|
1266
|
-
ch = state.input.charCodeAt(state.position);
|
|
1267
|
-
continue;
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
_line = state.line;
|
|
1271
|
-
composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
|
|
1272
|
-
_result.push(state.result);
|
|
1273
|
-
skipSeparationSpace(state, true, -1);
|
|
1274
|
-
ch = state.input.charCodeAt(state.position);
|
|
1275
|
-
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
|
|
1276
|
-
throwError(state, "bad indentation of a sequence entry");
|
|
1277
|
-
} else if (state.lineIndent < nodeIndent) {
|
|
1278
|
-
break;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
if (detected) {
|
|
1282
|
-
state.tag = _tag;
|
|
1283
|
-
state.anchor = _anchor;
|
|
1284
|
-
state.kind = "sequence";
|
|
1285
|
-
state.result = _result;
|
|
1286
|
-
return true;
|
|
1287
|
-
}
|
|
1288
|
-
return false;
|
|
1289
|
-
};
|
|
1290
|
-
readBlockMapping = function(state, nodeIndent, flowIndent) {
|
|
1291
|
-
var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
|
|
1292
|
-
if (state.firstTabInLine !== -1)
|
|
1293
|
-
return false;
|
|
1294
|
-
if (state.anchor !== null) {
|
|
1295
|
-
state.anchorMap[state.anchor] = _result;
|
|
1296
|
-
}
|
|
1297
|
-
ch = state.input.charCodeAt(state.position);
|
|
1298
|
-
while (ch !== 0) {
|
|
1299
|
-
if (!atExplicitKey && state.firstTabInLine !== -1) {
|
|
1300
|
-
state.position = state.firstTabInLine;
|
|
1301
|
-
throwError(state, "tab characters must not be used in indentation");
|
|
1302
|
-
}
|
|
1303
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
1304
|
-
_line = state.line;
|
|
1305
|
-
if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
|
|
1306
|
-
if (ch === 63) {
|
|
1307
|
-
if (atExplicitKey) {
|
|
1308
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
1309
|
-
keyTag = keyNode = valueNode = null;
|
|
1310
|
-
}
|
|
1311
|
-
detected = true;
|
|
1312
|
-
atExplicitKey = true;
|
|
1313
|
-
allowCompact = true;
|
|
1314
|
-
} else if (atExplicitKey) {
|
|
1315
|
-
atExplicitKey = false;
|
|
1316
|
-
allowCompact = true;
|
|
1317
|
-
} else {
|
|
1318
|
-
throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
|
|
1319
|
-
}
|
|
1320
|
-
state.position += 1;
|
|
1321
|
-
ch = following;
|
|
1322
|
-
} else {
|
|
1323
|
-
_keyLine = state.line;
|
|
1324
|
-
_keyLineStart = state.lineStart;
|
|
1325
|
-
_keyPos = state.position;
|
|
1326
|
-
if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
|
|
1327
|
-
break;
|
|
1328
|
-
}
|
|
1329
|
-
if (state.line === _line) {
|
|
1330
|
-
ch = state.input.charCodeAt(state.position);
|
|
1331
|
-
while (is_WHITE_SPACE(ch)) {
|
|
1332
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1333
|
-
}
|
|
1334
|
-
if (ch === 58) {
|
|
1335
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1336
|
-
if (!is_WS_OR_EOL(ch)) {
|
|
1337
|
-
throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
|
|
1338
|
-
}
|
|
1339
|
-
if (atExplicitKey) {
|
|
1340
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
1341
|
-
keyTag = keyNode = valueNode = null;
|
|
1342
|
-
}
|
|
1343
|
-
detected = true;
|
|
1344
|
-
atExplicitKey = false;
|
|
1345
|
-
allowCompact = false;
|
|
1346
|
-
keyTag = state.tag;
|
|
1347
|
-
keyNode = state.result;
|
|
1348
|
-
} else if (detected) {
|
|
1349
|
-
throwError(state, "can not read an implicit mapping pair; a colon is missed");
|
|
1350
|
-
} else {
|
|
1351
|
-
state.tag = _tag;
|
|
1352
|
-
state.anchor = _anchor;
|
|
1353
|
-
return true;
|
|
1354
|
-
}
|
|
1355
|
-
} else if (detected) {
|
|
1356
|
-
throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1357
|
-
} else {
|
|
1358
|
-
state.tag = _tag;
|
|
1359
|
-
state.anchor = _anchor;
|
|
1360
|
-
return true;
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
if (state.line === _line || state.lineIndent > nodeIndent) {
|
|
1364
|
-
if (atExplicitKey) {
|
|
1365
|
-
_keyLine = state.line;
|
|
1366
|
-
_keyLineStart = state.lineStart;
|
|
1367
|
-
_keyPos = state.position;
|
|
1368
|
-
}
|
|
1369
|
-
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
|
|
1370
|
-
if (atExplicitKey) {
|
|
1371
|
-
keyNode = state.result;
|
|
1372
|
-
} else {
|
|
1373
|
-
valueNode = state.result;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
if (!atExplicitKey) {
|
|
1377
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
|
|
1378
|
-
keyTag = keyNode = valueNode = null;
|
|
1379
|
-
}
|
|
1380
|
-
skipSeparationSpace(state, true, -1);
|
|
1381
|
-
ch = state.input.charCodeAt(state.position);
|
|
1382
|
-
}
|
|
1383
|
-
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
|
|
1384
|
-
throwError(state, "bad indentation of a mapping entry");
|
|
1385
|
-
} else if (state.lineIndent < nodeIndent) {
|
|
1386
|
-
break;
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
if (atExplicitKey) {
|
|
1390
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
1391
|
-
}
|
|
1392
|
-
if (detected) {
|
|
1393
|
-
state.tag = _tag;
|
|
1394
|
-
state.anchor = _anchor;
|
|
1395
|
-
state.kind = "mapping";
|
|
1396
|
-
state.result = _result;
|
|
1397
|
-
}
|
|
1398
|
-
return detected;
|
|
1399
|
-
};
|
|
1400
|
-
readTagProperty = function(state) {
|
|
1401
|
-
var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
|
|
1402
|
-
ch = state.input.charCodeAt(state.position);
|
|
1403
|
-
if (ch !== 33)
|
|
1404
|
-
return false;
|
|
1405
|
-
if (state.tag !== null) {
|
|
1406
|
-
throwError(state, "duplication of a tag property");
|
|
1407
|
-
}
|
|
1408
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1409
|
-
if (ch === 60) {
|
|
1410
|
-
isVerbatim = true;
|
|
1411
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1412
|
-
} else if (ch === 33) {
|
|
1413
|
-
isNamed = true;
|
|
1414
|
-
tagHandle = "!!";
|
|
1415
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1416
|
-
} else {
|
|
1417
|
-
tagHandle = "!";
|
|
1418
|
-
}
|
|
1419
|
-
_position = state.position;
|
|
1420
|
-
if (isVerbatim) {
|
|
1421
|
-
do {
|
|
1422
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1423
|
-
} while (ch !== 0 && ch !== 62);
|
|
1424
|
-
if (state.position < state.length) {
|
|
1425
|
-
tagName = state.input.slice(_position, state.position);
|
|
1426
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1427
|
-
} else {
|
|
1428
|
-
throwError(state, "unexpected end of the stream within a verbatim tag");
|
|
1429
|
-
}
|
|
1430
|
-
} else {
|
|
1431
|
-
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
|
1432
|
-
if (ch === 33) {
|
|
1433
|
-
if (!isNamed) {
|
|
1434
|
-
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
|
1435
|
-
if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
|
|
1436
|
-
throwError(state, "named tag handle cannot contain such characters");
|
|
1437
|
-
}
|
|
1438
|
-
isNamed = true;
|
|
1439
|
-
_position = state.position + 1;
|
|
1440
|
-
} else {
|
|
1441
|
-
throwError(state, "tag suffix cannot contain exclamation marks");
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1445
|
-
}
|
|
1446
|
-
tagName = state.input.slice(_position, state.position);
|
|
1447
|
-
if (PATTERN_FLOW_INDICATORS.test(tagName)) {
|
|
1448
|
-
throwError(state, "tag suffix cannot contain flow indicator characters");
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
if (tagName && !PATTERN_TAG_URI.test(tagName)) {
|
|
1452
|
-
throwError(state, "tag name cannot contain such characters: " + tagName);
|
|
1453
|
-
}
|
|
1454
|
-
try {
|
|
1455
|
-
tagName = decodeURIComponent(tagName);
|
|
1456
|
-
} catch (err) {
|
|
1457
|
-
throwError(state, "tag name is malformed: " + tagName);
|
|
1458
|
-
}
|
|
1459
|
-
if (isVerbatim) {
|
|
1460
|
-
state.tag = tagName;
|
|
1461
|
-
} else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {
|
|
1462
|
-
state.tag = state.tagMap[tagHandle] + tagName;
|
|
1463
|
-
} else if (tagHandle === "!") {
|
|
1464
|
-
state.tag = "!" + tagName;
|
|
1465
|
-
} else if (tagHandle === "!!") {
|
|
1466
|
-
state.tag = "tag:yaml.org,2002:" + tagName;
|
|
1467
|
-
} else {
|
|
1468
|
-
throwError(state, 'undeclared tag handle "' + tagHandle + '"');
|
|
1469
|
-
}
|
|
1470
|
-
return true;
|
|
1471
|
-
};
|
|
1472
|
-
readAnchorProperty = function(state) {
|
|
1473
|
-
var _position, ch;
|
|
1474
|
-
ch = state.input.charCodeAt(state.position);
|
|
1475
|
-
if (ch !== 38)
|
|
1476
|
-
return false;
|
|
1477
|
-
if (state.anchor !== null) {
|
|
1478
|
-
throwError(state, "duplication of an anchor property");
|
|
1479
|
-
}
|
|
1480
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1481
|
-
_position = state.position;
|
|
1482
|
-
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
|
|
1483
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1484
|
-
}
|
|
1485
|
-
if (state.position === _position) {
|
|
1486
|
-
throwError(state, "name of an anchor node must contain at least one character");
|
|
1487
|
-
}
|
|
1488
|
-
state.anchor = state.input.slice(_position, state.position);
|
|
1489
|
-
return true;
|
|
1490
|
-
};
|
|
1491
|
-
readAlias = function(state) {
|
|
1492
|
-
var _position, alias, ch;
|
|
1493
|
-
ch = state.input.charCodeAt(state.position);
|
|
1494
|
-
if (ch !== 42)
|
|
1495
|
-
return false;
|
|
1496
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1497
|
-
_position = state.position;
|
|
1498
|
-
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
|
|
1499
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1500
|
-
}
|
|
1501
|
-
if (state.position === _position) {
|
|
1502
|
-
throwError(state, "name of an alias node must contain at least one character");
|
|
1503
|
-
}
|
|
1504
|
-
alias = state.input.slice(_position, state.position);
|
|
1505
|
-
if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {
|
|
1506
|
-
throwError(state, 'unidentified alias "' + alias + '"');
|
|
1507
|
-
}
|
|
1508
|
-
state.result = state.anchorMap[alias];
|
|
1509
|
-
skipSeparationSpace(state, true, -1);
|
|
1510
|
-
return true;
|
|
1511
|
-
};
|
|
1512
|
-
composeNode = function(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
|
|
1513
|
-
var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent;
|
|
1514
|
-
if (state.listener !== null) {
|
|
1515
|
-
state.listener("open", state);
|
|
1516
|
-
}
|
|
1517
|
-
state.tag = null;
|
|
1518
|
-
state.anchor = null;
|
|
1519
|
-
state.kind = null;
|
|
1520
|
-
state.result = null;
|
|
1521
|
-
allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
|
|
1522
|
-
if (allowToSeek) {
|
|
1523
|
-
if (skipSeparationSpace(state, true, -1)) {
|
|
1524
|
-
atNewLine = true;
|
|
1525
|
-
if (state.lineIndent > parentIndent) {
|
|
1526
|
-
indentStatus = 1;
|
|
1527
|
-
} else if (state.lineIndent === parentIndent) {
|
|
1528
|
-
indentStatus = 0;
|
|
1529
|
-
} else if (state.lineIndent < parentIndent) {
|
|
1530
|
-
indentStatus = -1;
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
if (indentStatus === 1) {
|
|
1535
|
-
while (readTagProperty(state) || readAnchorProperty(state)) {
|
|
1536
|
-
if (skipSeparationSpace(state, true, -1)) {
|
|
1537
|
-
atNewLine = true;
|
|
1538
|
-
allowBlockCollections = allowBlockStyles;
|
|
1539
|
-
if (state.lineIndent > parentIndent) {
|
|
1540
|
-
indentStatus = 1;
|
|
1541
|
-
} else if (state.lineIndent === parentIndent) {
|
|
1542
|
-
indentStatus = 0;
|
|
1543
|
-
} else if (state.lineIndent < parentIndent) {
|
|
1544
|
-
indentStatus = -1;
|
|
1545
|
-
}
|
|
1546
|
-
} else {
|
|
1547
|
-
allowBlockCollections = false;
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
if (allowBlockCollections) {
|
|
1552
|
-
allowBlockCollections = atNewLine || allowCompact;
|
|
1553
|
-
}
|
|
1554
|
-
if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
|
|
1555
|
-
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
|
|
1556
|
-
flowIndent = parentIndent;
|
|
1557
|
-
} else {
|
|
1558
|
-
flowIndent = parentIndent + 1;
|
|
1559
|
-
}
|
|
1560
|
-
blockIndent = state.position - state.lineStart;
|
|
1561
|
-
if (indentStatus === 1) {
|
|
1562
|
-
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
|
|
1563
|
-
hasContent = true;
|
|
1564
|
-
} else {
|
|
1565
|
-
if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
|
|
1566
|
-
hasContent = true;
|
|
1567
|
-
} else if (readAlias(state)) {
|
|
1568
|
-
hasContent = true;
|
|
1569
|
-
if (state.tag !== null || state.anchor !== null) {
|
|
1570
|
-
throwError(state, "alias node should not have any properties");
|
|
1571
|
-
}
|
|
1572
|
-
} else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
|
1573
|
-
hasContent = true;
|
|
1574
|
-
if (state.tag === null) {
|
|
1575
|
-
state.tag = "?";
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
if (state.anchor !== null) {
|
|
1579
|
-
state.anchorMap[state.anchor] = state.result;
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
} else if (indentStatus === 0) {
|
|
1583
|
-
hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
if (state.tag === null) {
|
|
1587
|
-
if (state.anchor !== null) {
|
|
1588
|
-
state.anchorMap[state.anchor] = state.result;
|
|
1589
|
-
}
|
|
1590
|
-
} else if (state.tag === "?") {
|
|
1591
|
-
if (state.result !== null && state.kind !== "scalar") {
|
|
1592
|
-
throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
|
|
1593
|
-
}
|
|
1594
|
-
for (typeIndex = 0, typeQuantity = state.implicitTypes.length;typeIndex < typeQuantity; typeIndex += 1) {
|
|
1595
|
-
type = state.implicitTypes[typeIndex];
|
|
1596
|
-
if (type.resolve(state.result)) {
|
|
1597
|
-
state.result = type.construct(state.result);
|
|
1598
|
-
state.tag = type.tag;
|
|
1599
|
-
if (state.anchor !== null) {
|
|
1600
|
-
state.anchorMap[state.anchor] = state.result;
|
|
1601
|
-
}
|
|
1602
|
-
break;
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
} else if (state.tag !== "!") {
|
|
1606
|
-
if (_hasOwnProperty$1.call(state.typeMap[state.kind || "fallback"], state.tag)) {
|
|
1607
|
-
type = state.typeMap[state.kind || "fallback"][state.tag];
|
|
1608
|
-
} else {
|
|
1609
|
-
type = null;
|
|
1610
|
-
typeList = state.typeMap.multi[state.kind || "fallback"];
|
|
1611
|
-
for (typeIndex = 0, typeQuantity = typeList.length;typeIndex < typeQuantity; typeIndex += 1) {
|
|
1612
|
-
if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
|
|
1613
|
-
type = typeList[typeIndex];
|
|
1614
|
-
break;
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
if (!type) {
|
|
1619
|
-
throwError(state, "unknown tag !<" + state.tag + ">");
|
|
1620
|
-
}
|
|
1621
|
-
if (state.result !== null && type.kind !== state.kind) {
|
|
1622
|
-
throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
|
|
1623
|
-
}
|
|
1624
|
-
if (!type.resolve(state.result, state.tag)) {
|
|
1625
|
-
throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
|
|
1626
|
-
} else {
|
|
1627
|
-
state.result = type.construct(state.result, state.tag);
|
|
1628
|
-
if (state.anchor !== null) {
|
|
1629
|
-
state.anchorMap[state.anchor] = state.result;
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
if (state.listener !== null) {
|
|
1634
|
-
state.listener("close", state);
|
|
1635
|
-
}
|
|
1636
|
-
return state.tag !== null || state.anchor !== null || hasContent;
|
|
1637
|
-
};
|
|
1638
|
-
readDocument = function(state) {
|
|
1639
|
-
var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
|
|
1640
|
-
state.version = null;
|
|
1641
|
-
state.checkLineBreaks = state.legacy;
|
|
1642
|
-
state.tagMap = Object.create(null);
|
|
1643
|
-
state.anchorMap = Object.create(null);
|
|
1644
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
1645
|
-
skipSeparationSpace(state, true, -1);
|
|
1646
|
-
ch = state.input.charCodeAt(state.position);
|
|
1647
|
-
if (state.lineIndent > 0 || ch !== 37) {
|
|
1648
|
-
break;
|
|
1649
|
-
}
|
|
1650
|
-
hasDirectives = true;
|
|
1651
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1652
|
-
_position = state.position;
|
|
1653
|
-
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
|
1654
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1655
|
-
}
|
|
1656
|
-
directiveName = state.input.slice(_position, state.position);
|
|
1657
|
-
directiveArgs = [];
|
|
1658
|
-
if (directiveName.length < 1) {
|
|
1659
|
-
throwError(state, "directive name must not be less than one character in length");
|
|
1660
|
-
}
|
|
1661
|
-
while (ch !== 0) {
|
|
1662
|
-
while (is_WHITE_SPACE(ch)) {
|
|
1663
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1664
|
-
}
|
|
1665
|
-
if (ch === 35) {
|
|
1666
|
-
do {
|
|
1667
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1668
|
-
} while (ch !== 0 && !is_EOL(ch));
|
|
1669
|
-
break;
|
|
1670
|
-
}
|
|
1671
|
-
if (is_EOL(ch))
|
|
1672
|
-
break;
|
|
1673
|
-
_position = state.position;
|
|
1674
|
-
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
|
1675
|
-
ch = state.input.charCodeAt(++state.position);
|
|
1676
|
-
}
|
|
1677
|
-
directiveArgs.push(state.input.slice(_position, state.position));
|
|
1678
|
-
}
|
|
1679
|
-
if (ch !== 0)
|
|
1680
|
-
readLineBreak(state);
|
|
1681
|
-
if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {
|
|
1682
|
-
directiveHandlers[directiveName](state, directiveName, directiveArgs);
|
|
1683
|
-
} else {
|
|
1684
|
-
throwWarning(state, 'unknown document directive "' + directiveName + '"');
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
skipSeparationSpace(state, true, -1);
|
|
1688
|
-
if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
|
|
1689
|
-
state.position += 3;
|
|
1690
|
-
skipSeparationSpace(state, true, -1);
|
|
1691
|
-
} else if (hasDirectives) {
|
|
1692
|
-
throwError(state, "directives end mark is expected");
|
|
1693
|
-
}
|
|
1694
|
-
composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
|
|
1695
|
-
skipSeparationSpace(state, true, -1);
|
|
1696
|
-
if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
|
|
1697
|
-
throwWarning(state, "non-ASCII line breaks are interpreted as content");
|
|
1698
|
-
}
|
|
1699
|
-
state.documents.push(state.result);
|
|
1700
|
-
if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
1701
|
-
if (state.input.charCodeAt(state.position) === 46) {
|
|
1702
|
-
state.position += 3;
|
|
1703
|
-
skipSeparationSpace(state, true, -1);
|
|
1704
|
-
}
|
|
1705
|
-
return;
|
|
1706
|
-
}
|
|
1707
|
-
if (state.position < state.length - 1) {
|
|
1708
|
-
throwError(state, "end of the stream or a document separator is expected");
|
|
1709
|
-
} else {
|
|
1710
|
-
return;
|
|
1711
|
-
}
|
|
1712
|
-
};
|
|
1713
|
-
loadDocuments = function(input, options) {
|
|
1714
|
-
input = String(input);
|
|
1715
|
-
options = options || {};
|
|
1716
|
-
if (input.length !== 0) {
|
|
1717
|
-
if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
|
|
1718
|
-
input += "\n";
|
|
1719
|
-
}
|
|
1720
|
-
if (input.charCodeAt(0) === 65279) {
|
|
1721
|
-
input = input.slice(1);
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
var state = new State$1(input, options);
|
|
1725
|
-
var nullpos = input.indexOf("\0");
|
|
1726
|
-
if (nullpos !== -1) {
|
|
1727
|
-
state.position = nullpos;
|
|
1728
|
-
throwError(state, "null byte is not allowed in input");
|
|
1729
|
-
}
|
|
1730
|
-
state.input += "\0";
|
|
1731
|
-
while (state.input.charCodeAt(state.position) === 32) {
|
|
1732
|
-
state.lineIndent += 1;
|
|
1733
|
-
state.position += 1;
|
|
1734
|
-
}
|
|
1735
|
-
while (state.position < state.length - 1) {
|
|
1736
|
-
readDocument(state);
|
|
1737
|
-
}
|
|
1738
|
-
return state.documents;
|
|
1739
|
-
};
|
|
1740
|
-
loadAll$1 = function(input, iterator, options) {
|
|
1741
|
-
if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") {
|
|
1742
|
-
options = iterator;
|
|
1743
|
-
iterator = null;
|
|
1744
|
-
}
|
|
1745
|
-
var documents = loadDocuments(input, options);
|
|
1746
|
-
if (typeof iterator !== "function") {
|
|
1747
|
-
return documents;
|
|
1748
|
-
}
|
|
1749
|
-
for (var index = 0, length = documents.length;index < length; index += 1) {
|
|
1750
|
-
iterator(documents[index]);
|
|
1751
|
-
}
|
|
1752
|
-
};
|
|
1753
|
-
load$1 = function(input, options) {
|
|
1754
|
-
var documents = loadDocuments(input, options);
|
|
1755
|
-
if (documents.length === 0) {
|
|
1756
|
-
return;
|
|
1757
|
-
} else if (documents.length === 1) {
|
|
1758
|
-
return documents[0];
|
|
1759
|
-
}
|
|
1760
|
-
throw new exception("expected a single document in the stream, but found more");
|
|
1761
|
-
};
|
|
1762
|
-
compileStyleMap = function(schema, map) {
|
|
1763
|
-
var result, keys, index, length, tag, style, type;
|
|
1764
|
-
if (map === null)
|
|
1765
|
-
return {};
|
|
1766
|
-
result = {};
|
|
1767
|
-
keys = Object.keys(map);
|
|
1768
|
-
for (index = 0, length = keys.length;index < length; index += 1) {
|
|
1769
|
-
tag = keys[index];
|
|
1770
|
-
style = String(map[tag]);
|
|
1771
|
-
if (tag.slice(0, 2) === "!!") {
|
|
1772
|
-
tag = "tag:yaml.org,2002:" + tag.slice(2);
|
|
1773
|
-
}
|
|
1774
|
-
type = schema.compiledTypeMap["fallback"][tag];
|
|
1775
|
-
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
|
|
1776
|
-
style = type.styleAliases[style];
|
|
1777
|
-
}
|
|
1778
|
-
result[tag] = style;
|
|
1779
|
-
}
|
|
1780
|
-
return result;
|
|
1781
|
-
};
|
|
1782
|
-
encodeHex = function(character) {
|
|
1783
|
-
var string, handle, length;
|
|
1784
|
-
string = character.toString(16).toUpperCase();
|
|
1785
|
-
if (character <= 255) {
|
|
1786
|
-
handle = "x";
|
|
1787
|
-
length = 2;
|
|
1788
|
-
} else if (character <= 65535) {
|
|
1789
|
-
handle = "u";
|
|
1790
|
-
length = 4;
|
|
1791
|
-
} else if (character <= 4294967295) {
|
|
1792
|
-
handle = "U";
|
|
1793
|
-
length = 8;
|
|
1794
|
-
} else {
|
|
1795
|
-
throw new exception("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1796
|
-
}
|
|
1797
|
-
return "\\" + handle + common.repeat("0", length - string.length) + string;
|
|
1798
|
-
};
|
|
1799
|
-
State = function(options) {
|
|
1800
|
-
this.schema = options["schema"] || _default;
|
|
1801
|
-
this.indent = Math.max(1, options["indent"] || 2);
|
|
1802
|
-
this.noArrayIndent = options["noArrayIndent"] || false;
|
|
1803
|
-
this.skipInvalid = options["skipInvalid"] || false;
|
|
1804
|
-
this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
|
|
1805
|
-
this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
|
|
1806
|
-
this.sortKeys = options["sortKeys"] || false;
|
|
1807
|
-
this.lineWidth = options["lineWidth"] || 80;
|
|
1808
|
-
this.noRefs = options["noRefs"] || false;
|
|
1809
|
-
this.noCompatMode = options["noCompatMode"] || false;
|
|
1810
|
-
this.condenseFlow = options["condenseFlow"] || false;
|
|
1811
|
-
this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
|
|
1812
|
-
this.forceQuotes = options["forceQuotes"] || false;
|
|
1813
|
-
this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null;
|
|
1814
|
-
this.implicitTypes = this.schema.compiledImplicit;
|
|
1815
|
-
this.explicitTypes = this.schema.compiledExplicit;
|
|
1816
|
-
this.tag = null;
|
|
1817
|
-
this.result = "";
|
|
1818
|
-
this.duplicates = [];
|
|
1819
|
-
this.usedDuplicates = null;
|
|
1820
|
-
};
|
|
1821
|
-
indentString = function(string, spaces) {
|
|
1822
|
-
var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length;
|
|
1823
|
-
while (position < length) {
|
|
1824
|
-
next = string.indexOf("\n", position);
|
|
1825
|
-
if (next === -1) {
|
|
1826
|
-
line = string.slice(position);
|
|
1827
|
-
position = length;
|
|
1828
|
-
} else {
|
|
1829
|
-
line = string.slice(position, next + 1);
|
|
1830
|
-
position = next + 1;
|
|
1831
|
-
}
|
|
1832
|
-
if (line.length && line !== "\n")
|
|
1833
|
-
result += ind;
|
|
1834
|
-
result += line;
|
|
1835
|
-
}
|
|
1836
|
-
return result;
|
|
1837
|
-
};
|
|
1838
|
-
generateNextLine = function(state, level) {
|
|
1839
|
-
return "\n" + common.repeat(" ", state.indent * level);
|
|
1840
|
-
};
|
|
1841
|
-
testImplicitResolving = function(state, str) {
|
|
1842
|
-
var index, length, type;
|
|
1843
|
-
for (index = 0, length = state.implicitTypes.length;index < length; index += 1) {
|
|
1844
|
-
type = state.implicitTypes[index];
|
|
1845
|
-
if (type.resolve(str)) {
|
|
1846
|
-
return true;
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1849
|
-
return false;
|
|
1850
|
-
};
|
|
1851
|
-
isWhitespace = function(c) {
|
|
1852
|
-
return c === CHAR_SPACE || c === CHAR_TAB;
|
|
1853
|
-
};
|
|
1854
|
-
isPrintable = function(c) {
|
|
1855
|
-
return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111;
|
|
1856
|
-
};
|
|
1857
|
-
isNsCharOrWhitespace = function(c) {
|
|
1858
|
-
return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
|
|
1859
|
-
};
|
|
1860
|
-
isPlainSafe = function(c, prev, inblock) {
|
|
1861
|
-
var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
|
|
1862
|
-
var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
|
|
1863
|
-
return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar;
|
|
1864
|
-
};
|
|
1865
|
-
isPlainSafeFirst = function(c) {
|
|
1866
|
-
return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
|
|
1867
|
-
};
|
|
1868
|
-
isPlainSafeLast = function(c) {
|
|
1869
|
-
return !isWhitespace(c) && c !== CHAR_COLON;
|
|
1870
|
-
};
|
|
1871
|
-
codePointAt = function(string, pos) {
|
|
1872
|
-
var first = string.charCodeAt(pos), second;
|
|
1873
|
-
if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
|
|
1874
|
-
second = string.charCodeAt(pos + 1);
|
|
1875
|
-
if (second >= 56320 && second <= 57343) {
|
|
1876
|
-
return (first - 55296) * 1024 + second - 56320 + 65536;
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
return first;
|
|
1880
|
-
};
|
|
1881
|
-
needIndentIndicator = function(string) {
|
|
1882
|
-
var leadingSpaceRe = /^\n* /;
|
|
1883
|
-
return leadingSpaceRe.test(string);
|
|
1884
|
-
};
|
|
1885
|
-
chooseScalarStyle = function(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
|
|
1886
|
-
var i;
|
|
1887
|
-
var char = 0;
|
|
1888
|
-
var prevChar = null;
|
|
1889
|
-
var hasLineBreak = false;
|
|
1890
|
-
var hasFoldableLine = false;
|
|
1891
|
-
var shouldTrackWidth = lineWidth !== -1;
|
|
1892
|
-
var previousLineBreak = -1;
|
|
1893
|
-
var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
|
|
1894
|
-
if (singleLineOnly || forceQuotes) {
|
|
1895
|
-
for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
1896
|
-
char = codePointAt(string, i);
|
|
1897
|
-
if (!isPrintable(char)) {
|
|
1898
|
-
return STYLE_DOUBLE;
|
|
1899
|
-
}
|
|
1900
|
-
plain = plain && isPlainSafe(char, prevChar, inblock);
|
|
1901
|
-
prevChar = char;
|
|
1902
|
-
}
|
|
1903
|
-
} else {
|
|
1904
|
-
for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
1905
|
-
char = codePointAt(string, i);
|
|
1906
|
-
if (char === CHAR_LINE_FEED) {
|
|
1907
|
-
hasLineBreak = true;
|
|
1908
|
-
if (shouldTrackWidth) {
|
|
1909
|
-
hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
|
|
1910
|
-
previousLineBreak = i;
|
|
1911
|
-
}
|
|
1912
|
-
} else if (!isPrintable(char)) {
|
|
1913
|
-
return STYLE_DOUBLE;
|
|
1914
|
-
}
|
|
1915
|
-
plain = plain && isPlainSafe(char, prevChar, inblock);
|
|
1916
|
-
prevChar = char;
|
|
1917
|
-
}
|
|
1918
|
-
hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ");
|
|
1919
|
-
}
|
|
1920
|
-
if (!hasLineBreak && !hasFoldableLine) {
|
|
1921
|
-
if (plain && !forceQuotes && !testAmbiguousType(string)) {
|
|
1922
|
-
return STYLE_PLAIN;
|
|
1923
|
-
}
|
|
1924
|
-
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
|
|
1925
|
-
}
|
|
1926
|
-
if (indentPerLevel > 9 && needIndentIndicator(string)) {
|
|
1927
|
-
return STYLE_DOUBLE;
|
|
1928
|
-
}
|
|
1929
|
-
if (!forceQuotes) {
|
|
1930
|
-
return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
|
|
1931
|
-
}
|
|
1932
|
-
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
|
|
1933
|
-
};
|
|
1934
|
-
writeScalar = function(state, string, level, iskey, inblock) {
|
|
1935
|
-
state.dump = function() {
|
|
1936
|
-
if (string.length === 0) {
|
|
1937
|
-
return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
|
|
1938
|
-
}
|
|
1939
|
-
if (!state.noCompatMode) {
|
|
1940
|
-
if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
|
|
1941
|
-
return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
var indent = state.indent * Math.max(1, level);
|
|
1945
|
-
var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
|
|
1946
|
-
var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
|
|
1947
|
-
function testAmbiguity(string2) {
|
|
1948
|
-
return testImplicitResolving(state, string2);
|
|
1949
|
-
}
|
|
1950
|
-
switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {
|
|
1951
|
-
case STYLE_PLAIN:
|
|
1952
|
-
return string;
|
|
1953
|
-
case STYLE_SINGLE:
|
|
1954
|
-
return "'" + string.replace(/'/g, "''") + "'";
|
|
1955
|
-
case STYLE_LITERAL:
|
|
1956
|
-
return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent));
|
|
1957
|
-
case STYLE_FOLDED:
|
|
1958
|
-
return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
|
|
1959
|
-
case STYLE_DOUBLE:
|
|
1960
|
-
return '"' + escapeString(string) + '"';
|
|
1961
|
-
default:
|
|
1962
|
-
throw new exception("impossible error: invalid scalar style");
|
|
1963
|
-
}
|
|
1964
|
-
}();
|
|
1965
|
-
};
|
|
1966
|
-
blockHeader = function(string, indentPerLevel) {
|
|
1967
|
-
var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
|
|
1968
|
-
var clip = string[string.length - 1] === "\n";
|
|
1969
|
-
var keep = clip && (string[string.length - 2] === "\n" || string === "\n");
|
|
1970
|
-
var chomp = keep ? "+" : clip ? "" : "-";
|
|
1971
|
-
return indentIndicator + chomp + "\n";
|
|
1972
|
-
};
|
|
1973
|
-
dropEndingNewline = function(string) {
|
|
1974
|
-
return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
|
|
1975
|
-
};
|
|
1976
|
-
foldString = function(string, width) {
|
|
1977
|
-
var lineRe = /(\n+)([^\n]*)/g;
|
|
1978
|
-
var result = function() {
|
|
1979
|
-
var nextLF = string.indexOf("\n");
|
|
1980
|
-
nextLF = nextLF !== -1 ? nextLF : string.length;
|
|
1981
|
-
lineRe.lastIndex = nextLF;
|
|
1982
|
-
return foldLine(string.slice(0, nextLF), width);
|
|
1983
|
-
}();
|
|
1984
|
-
var prevMoreIndented = string[0] === "\n" || string[0] === " ";
|
|
1985
|
-
var moreIndented;
|
|
1986
|
-
var match;
|
|
1987
|
-
while (match = lineRe.exec(string)) {
|
|
1988
|
-
var prefix = match[1], line = match[2];
|
|
1989
|
-
moreIndented = line[0] === " ";
|
|
1990
|
-
result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
|
|
1991
|
-
prevMoreIndented = moreIndented;
|
|
1992
|
-
}
|
|
1993
|
-
return result;
|
|
1994
|
-
};
|
|
1995
|
-
foldLine = function(line, width) {
|
|
1996
|
-
if (line === "" || line[0] === " ")
|
|
1997
|
-
return line;
|
|
1998
|
-
var breakRe = / [^ ]/g;
|
|
1999
|
-
var match;
|
|
2000
|
-
var start = 0, end, curr = 0, next = 0;
|
|
2001
|
-
var result = "";
|
|
2002
|
-
while (match = breakRe.exec(line)) {
|
|
2003
|
-
next = match.index;
|
|
2004
|
-
if (next - start > width) {
|
|
2005
|
-
end = curr > start ? curr : next;
|
|
2006
|
-
result += "\n" + line.slice(start, end);
|
|
2007
|
-
start = end + 1;
|
|
2008
|
-
}
|
|
2009
|
-
curr = next;
|
|
2010
|
-
}
|
|
2011
|
-
result += "\n";
|
|
2012
|
-
if (line.length - start > width && curr > start) {
|
|
2013
|
-
result += line.slice(start, curr) + "\n" + line.slice(curr + 1);
|
|
2014
|
-
} else {
|
|
2015
|
-
result += line.slice(start);
|
|
2016
|
-
}
|
|
2017
|
-
return result.slice(1);
|
|
2018
|
-
};
|
|
2019
|
-
escapeString = function(string) {
|
|
2020
|
-
var result = "";
|
|
2021
|
-
var char = 0;
|
|
2022
|
-
var escapeSeq;
|
|
2023
|
-
for (var i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
2024
|
-
char = codePointAt(string, i);
|
|
2025
|
-
escapeSeq = ESCAPE_SEQUENCES[char];
|
|
2026
|
-
if (!escapeSeq && isPrintable(char)) {
|
|
2027
|
-
result += string[i];
|
|
2028
|
-
if (char >= 65536)
|
|
2029
|
-
result += string[i + 1];
|
|
2030
|
-
} else {
|
|
2031
|
-
result += escapeSeq || encodeHex(char);
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
return result;
|
|
2035
|
-
};
|
|
2036
|
-
writeFlowSequence = function(state, level, object) {
|
|
2037
|
-
var _result = "", _tag = state.tag, index, length, value;
|
|
2038
|
-
for (index = 0, length = object.length;index < length; index += 1) {
|
|
2039
|
-
value = object[index];
|
|
2040
|
-
if (state.replacer) {
|
|
2041
|
-
value = state.replacer.call(object, String(index), value);
|
|
2042
|
-
}
|
|
2043
|
-
if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
|
|
2044
|
-
if (_result !== "")
|
|
2045
|
-
_result += "," + (!state.condenseFlow ? " " : "");
|
|
2046
|
-
_result += state.dump;
|
|
2047
|
-
}
|
|
2048
|
-
}
|
|
2049
|
-
state.tag = _tag;
|
|
2050
|
-
state.dump = "[" + _result + "]";
|
|
2051
|
-
};
|
|
2052
|
-
writeBlockSequence = function(state, level, object, compact) {
|
|
2053
|
-
var _result = "", _tag = state.tag, index, length, value;
|
|
2054
|
-
for (index = 0, length = object.length;index < length; index += 1) {
|
|
2055
|
-
value = object[index];
|
|
2056
|
-
if (state.replacer) {
|
|
2057
|
-
value = state.replacer.call(object, String(index), value);
|
|
2058
|
-
}
|
|
2059
|
-
if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
|
|
2060
|
-
if (!compact || _result !== "") {
|
|
2061
|
-
_result += generateNextLine(state, level);
|
|
2062
|
-
}
|
|
2063
|
-
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
2064
|
-
_result += "-";
|
|
2065
|
-
} else {
|
|
2066
|
-
_result += "- ";
|
|
2067
|
-
}
|
|
2068
|
-
_result += state.dump;
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
state.tag = _tag;
|
|
2072
|
-
state.dump = _result || "[]";
|
|
2073
|
-
};
|
|
2074
|
-
writeFlowMapping = function(state, level, object) {
|
|
2075
|
-
var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
|
|
2076
|
-
for (index = 0, length = objectKeyList.length;index < length; index += 1) {
|
|
2077
|
-
pairBuffer = "";
|
|
2078
|
-
if (_result !== "")
|
|
2079
|
-
pairBuffer += ", ";
|
|
2080
|
-
if (state.condenseFlow)
|
|
2081
|
-
pairBuffer += '"';
|
|
2082
|
-
objectKey = objectKeyList[index];
|
|
2083
|
-
objectValue = object[objectKey];
|
|
2084
|
-
if (state.replacer) {
|
|
2085
|
-
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
2086
|
-
}
|
|
2087
|
-
if (!writeNode(state, level, objectKey, false, false)) {
|
|
2088
|
-
continue;
|
|
2089
|
-
}
|
|
2090
|
-
if (state.dump.length > 1024)
|
|
2091
|
-
pairBuffer += "? ";
|
|
2092
|
-
pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
|
|
2093
|
-
if (!writeNode(state, level, objectValue, false, false)) {
|
|
2094
|
-
continue;
|
|
2095
|
-
}
|
|
2096
|
-
pairBuffer += state.dump;
|
|
2097
|
-
_result += pairBuffer;
|
|
2098
|
-
}
|
|
2099
|
-
state.tag = _tag;
|
|
2100
|
-
state.dump = "{" + _result + "}";
|
|
2101
|
-
};
|
|
2102
|
-
writeBlockMapping = function(state, level, object, compact) {
|
|
2103
|
-
var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
|
|
2104
|
-
if (state.sortKeys === true) {
|
|
2105
|
-
objectKeyList.sort();
|
|
2106
|
-
} else if (typeof state.sortKeys === "function") {
|
|
2107
|
-
objectKeyList.sort(state.sortKeys);
|
|
2108
|
-
} else if (state.sortKeys) {
|
|
2109
|
-
throw new exception("sortKeys must be a boolean or a function");
|
|
2110
|
-
}
|
|
2111
|
-
for (index = 0, length = objectKeyList.length;index < length; index += 1) {
|
|
2112
|
-
pairBuffer = "";
|
|
2113
|
-
if (!compact || _result !== "") {
|
|
2114
|
-
pairBuffer += generateNextLine(state, level);
|
|
2115
|
-
}
|
|
2116
|
-
objectKey = objectKeyList[index];
|
|
2117
|
-
objectValue = object[objectKey];
|
|
2118
|
-
if (state.replacer) {
|
|
2119
|
-
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
2120
|
-
}
|
|
2121
|
-
if (!writeNode(state, level + 1, objectKey, true, true, true)) {
|
|
2122
|
-
continue;
|
|
2123
|
-
}
|
|
2124
|
-
explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
|
2125
|
-
if (explicitPair) {
|
|
2126
|
-
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
2127
|
-
pairBuffer += "?";
|
|
2128
|
-
} else {
|
|
2129
|
-
pairBuffer += "? ";
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
pairBuffer += state.dump;
|
|
2133
|
-
if (explicitPair) {
|
|
2134
|
-
pairBuffer += generateNextLine(state, level);
|
|
2135
|
-
}
|
|
2136
|
-
if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
|
|
2137
|
-
continue;
|
|
2138
|
-
}
|
|
2139
|
-
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
2140
|
-
pairBuffer += ":";
|
|
2141
|
-
} else {
|
|
2142
|
-
pairBuffer += ": ";
|
|
2143
|
-
}
|
|
2144
|
-
pairBuffer += state.dump;
|
|
2145
|
-
_result += pairBuffer;
|
|
2146
|
-
}
|
|
2147
|
-
state.tag = _tag;
|
|
2148
|
-
state.dump = _result || "{}";
|
|
2149
|
-
};
|
|
2150
|
-
detectType = function(state, object, explicit) {
|
|
2151
|
-
var _result, typeList, index, length, type, style;
|
|
2152
|
-
typeList = explicit ? state.explicitTypes : state.implicitTypes;
|
|
2153
|
-
for (index = 0, length = typeList.length;index < length; index += 1) {
|
|
2154
|
-
type = typeList[index];
|
|
2155
|
-
if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
|
|
2156
|
-
if (explicit) {
|
|
2157
|
-
if (type.multi && type.representName) {
|
|
2158
|
-
state.tag = type.representName(object);
|
|
2159
|
-
} else {
|
|
2160
|
-
state.tag = type.tag;
|
|
2161
|
-
}
|
|
2162
|
-
} else {
|
|
2163
|
-
state.tag = "?";
|
|
2164
|
-
}
|
|
2165
|
-
if (type.represent) {
|
|
2166
|
-
style = state.styleMap[type.tag] || type.defaultStyle;
|
|
2167
|
-
if (_toString.call(type.represent) === "[object Function]") {
|
|
2168
|
-
_result = type.represent(object, style);
|
|
2169
|
-
} else if (_hasOwnProperty.call(type.represent, style)) {
|
|
2170
|
-
_result = type.represent[style](object, style);
|
|
2171
|
-
} else {
|
|
2172
|
-
throw new exception("!<" + type.tag + '> tag resolver accepts not "' + style + '" style');
|
|
2173
|
-
}
|
|
2174
|
-
state.dump = _result;
|
|
2175
|
-
}
|
|
2176
|
-
return true;
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
|
-
return false;
|
|
2180
|
-
};
|
|
2181
|
-
writeNode = function(state, level, object, block, compact, iskey, isblockseq) {
|
|
2182
|
-
state.tag = null;
|
|
2183
|
-
state.dump = object;
|
|
2184
|
-
if (!detectType(state, object, false)) {
|
|
2185
|
-
detectType(state, object, true);
|
|
2186
|
-
}
|
|
2187
|
-
var type = _toString.call(state.dump);
|
|
2188
|
-
var inblock = block;
|
|
2189
|
-
var tagStr;
|
|
2190
|
-
if (block) {
|
|
2191
|
-
block = state.flowLevel < 0 || state.flowLevel > level;
|
|
2192
|
-
}
|
|
2193
|
-
var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
|
|
2194
|
-
if (objectOrArray) {
|
|
2195
|
-
duplicateIndex = state.duplicates.indexOf(object);
|
|
2196
|
-
duplicate = duplicateIndex !== -1;
|
|
2197
|
-
}
|
|
2198
|
-
if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
|
|
2199
|
-
compact = false;
|
|
2200
|
-
}
|
|
2201
|
-
if (duplicate && state.usedDuplicates[duplicateIndex]) {
|
|
2202
|
-
state.dump = "*ref_" + duplicateIndex;
|
|
2203
|
-
} else {
|
|
2204
|
-
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
|
|
2205
|
-
state.usedDuplicates[duplicateIndex] = true;
|
|
2206
|
-
}
|
|
2207
|
-
if (type === "[object Object]") {
|
|
2208
|
-
if (block && Object.keys(state.dump).length !== 0) {
|
|
2209
|
-
writeBlockMapping(state, level, state.dump, compact);
|
|
2210
|
-
if (duplicate) {
|
|
2211
|
-
state.dump = "&ref_" + duplicateIndex + state.dump;
|
|
2212
|
-
}
|
|
2213
|
-
} else {
|
|
2214
|
-
writeFlowMapping(state, level, state.dump);
|
|
2215
|
-
if (duplicate) {
|
|
2216
|
-
state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
} else if (type === "[object Array]") {
|
|
2220
|
-
if (block && state.dump.length !== 0) {
|
|
2221
|
-
if (state.noArrayIndent && !isblockseq && level > 0) {
|
|
2222
|
-
writeBlockSequence(state, level - 1, state.dump, compact);
|
|
2223
|
-
} else {
|
|
2224
|
-
writeBlockSequence(state, level, state.dump, compact);
|
|
2225
|
-
}
|
|
2226
|
-
if (duplicate) {
|
|
2227
|
-
state.dump = "&ref_" + duplicateIndex + state.dump;
|
|
2228
|
-
}
|
|
2229
|
-
} else {
|
|
2230
|
-
writeFlowSequence(state, level, state.dump);
|
|
2231
|
-
if (duplicate) {
|
|
2232
|
-
state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
|
2233
|
-
}
|
|
2234
|
-
}
|
|
2235
|
-
} else if (type === "[object String]") {
|
|
2236
|
-
if (state.tag !== "?") {
|
|
2237
|
-
writeScalar(state, state.dump, level, iskey, inblock);
|
|
2238
|
-
}
|
|
2239
|
-
} else if (type === "[object Undefined]") {
|
|
2240
|
-
return false;
|
|
2241
|
-
} else {
|
|
2242
|
-
if (state.skipInvalid)
|
|
2243
|
-
return false;
|
|
2244
|
-
throw new exception("unacceptable kind of an object to dump " + type);
|
|
2245
|
-
}
|
|
2246
|
-
if (state.tag !== null && state.tag !== "?") {
|
|
2247
|
-
tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21");
|
|
2248
|
-
if (state.tag[0] === "!") {
|
|
2249
|
-
tagStr = "!" + tagStr;
|
|
2250
|
-
} else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
|
|
2251
|
-
tagStr = "!!" + tagStr.slice(18);
|
|
2252
|
-
} else {
|
|
2253
|
-
tagStr = "!<" + tagStr + ">";
|
|
2254
|
-
}
|
|
2255
|
-
state.dump = tagStr + " " + state.dump;
|
|
2256
|
-
}
|
|
2257
|
-
}
|
|
2258
|
-
return true;
|
|
2259
|
-
};
|
|
2260
|
-
getDuplicateReferences = function(object, state) {
|
|
2261
|
-
var objects = [], duplicatesIndexes = [], index, length;
|
|
2262
|
-
inspectNode(object, objects, duplicatesIndexes);
|
|
2263
|
-
for (index = 0, length = duplicatesIndexes.length;index < length; index += 1) {
|
|
2264
|
-
state.duplicates.push(objects[duplicatesIndexes[index]]);
|
|
2265
|
-
}
|
|
2266
|
-
state.usedDuplicates = new Array(length);
|
|
2267
|
-
};
|
|
2268
|
-
inspectNode = function(object, objects, duplicatesIndexes) {
|
|
2269
|
-
var objectKeyList, index, length;
|
|
2270
|
-
if (object !== null && typeof object === "object") {
|
|
2271
|
-
index = objects.indexOf(object);
|
|
2272
|
-
if (index !== -1) {
|
|
2273
|
-
if (duplicatesIndexes.indexOf(index) === -1) {
|
|
2274
|
-
duplicatesIndexes.push(index);
|
|
2275
|
-
}
|
|
2276
|
-
} else {
|
|
2277
|
-
objects.push(object);
|
|
2278
|
-
if (Array.isArray(object)) {
|
|
2279
|
-
for (index = 0, length = object.length;index < length; index += 1) {
|
|
2280
|
-
inspectNode(object[index], objects, duplicatesIndexes);
|
|
2281
|
-
}
|
|
2282
|
-
} else {
|
|
2283
|
-
objectKeyList = Object.keys(object);
|
|
2284
|
-
for (index = 0, length = objectKeyList.length;index < length; index += 1) {
|
|
2285
|
-
inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
};
|
|
2291
|
-
dump$1 = function(input, options) {
|
|
2292
|
-
options = options || {};
|
|
2293
|
-
var state = new State(options);
|
|
2294
|
-
if (!state.noRefs)
|
|
2295
|
-
getDuplicateReferences(input, state);
|
|
2296
|
-
var value = input;
|
|
2297
|
-
if (state.replacer) {
|
|
2298
|
-
value = state.replacer.call({ "": value }, "", value);
|
|
2299
|
-
}
|
|
2300
|
-
if (writeNode(state, 0, value, true, true))
|
|
2301
|
-
return state.dump + "\n";
|
|
2302
|
-
return "";
|
|
2303
|
-
};
|
|
2304
|
-
renamed = function(from, to) {
|
|
2305
|
-
return function() {
|
|
2306
|
-
throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
|
|
2307
|
-
};
|
|
2308
|
-
};
|
|
2309
|
-
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
2310
|
-
isNothing_1 = isNothing;
|
|
2311
|
-
isObject_1 = isObject;
|
|
2312
|
-
toArray_1 = toArray;
|
|
2313
|
-
repeat_1 = repeat;
|
|
2314
|
-
isNegativeZero_1 = isNegativeZero;
|
|
2315
|
-
extend_1 = extend;
|
|
2316
|
-
common = {
|
|
2317
|
-
isNothing: isNothing_1,
|
|
2318
|
-
isObject: isObject_1,
|
|
2319
|
-
toArray: toArray_1,
|
|
2320
|
-
repeat: repeat_1,
|
|
2321
|
-
isNegativeZero: isNegativeZero_1,
|
|
2322
|
-
extend: extend_1
|
|
2323
|
-
};
|
|
2324
|
-
YAMLException$1.prototype = Object.create(Error.prototype);
|
|
2325
|
-
YAMLException$1.prototype.constructor = YAMLException$1;
|
|
2326
|
-
YAMLException$1.prototype.toString = function toString(compact) {
|
|
2327
|
-
return this.name + ": " + formatError(this, compact);
|
|
2328
|
-
};
|
|
2329
|
-
exception = YAMLException$1;
|
|
2330
|
-
snippet = makeSnippet;
|
|
2331
|
-
TYPE_CONSTRUCTOR_OPTIONS = [
|
|
2332
|
-
"kind",
|
|
2333
|
-
"multi",
|
|
2334
|
-
"resolve",
|
|
2335
|
-
"construct",
|
|
2336
|
-
"instanceOf",
|
|
2337
|
-
"predicate",
|
|
2338
|
-
"represent",
|
|
2339
|
-
"representName",
|
|
2340
|
-
"defaultStyle",
|
|
2341
|
-
"styleAliases"
|
|
2342
|
-
];
|
|
2343
|
-
YAML_NODE_KINDS = [
|
|
2344
|
-
"scalar",
|
|
2345
|
-
"sequence",
|
|
2346
|
-
"mapping"
|
|
2347
|
-
];
|
|
2348
|
-
type = Type$1;
|
|
2349
|
-
Schema$1.prototype.extend = function extend2(definition) {
|
|
2350
|
-
var implicit = [];
|
|
2351
|
-
var explicit = [];
|
|
2352
|
-
if (definition instanceof type) {
|
|
2353
|
-
explicit.push(definition);
|
|
2354
|
-
} else if (Array.isArray(definition)) {
|
|
2355
|
-
explicit = explicit.concat(definition);
|
|
2356
|
-
} else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
|
|
2357
|
-
if (definition.implicit)
|
|
2358
|
-
implicit = implicit.concat(definition.implicit);
|
|
2359
|
-
if (definition.explicit)
|
|
2360
|
-
explicit = explicit.concat(definition.explicit);
|
|
2361
|
-
} else {
|
|
2362
|
-
throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
2363
|
-
}
|
|
2364
|
-
implicit.forEach(function(type$1) {
|
|
2365
|
-
if (!(type$1 instanceof type)) {
|
|
2366
|
-
throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
2367
|
-
}
|
|
2368
|
-
if (type$1.loadKind && type$1.loadKind !== "scalar") {
|
|
2369
|
-
throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
2370
|
-
}
|
|
2371
|
-
if (type$1.multi) {
|
|
2372
|
-
throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
2373
|
-
}
|
|
2374
|
-
});
|
|
2375
|
-
explicit.forEach(function(type$1) {
|
|
2376
|
-
if (!(type$1 instanceof type)) {
|
|
2377
|
-
throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
2378
|
-
}
|
|
2379
|
-
});
|
|
2380
|
-
var result = Object.create(Schema$1.prototype);
|
|
2381
|
-
result.implicit = (this.implicit || []).concat(implicit);
|
|
2382
|
-
result.explicit = (this.explicit || []).concat(explicit);
|
|
2383
|
-
result.compiledImplicit = compileList(result, "implicit");
|
|
2384
|
-
result.compiledExplicit = compileList(result, "explicit");
|
|
2385
|
-
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
|
|
2386
|
-
return result;
|
|
2387
|
-
};
|
|
2388
|
-
schema = Schema$1;
|
|
2389
|
-
str = new type("tag:yaml.org,2002:str", {
|
|
2390
|
-
kind: "scalar",
|
|
2391
|
-
construct: function(data) {
|
|
2392
|
-
return data !== null ? data : "";
|
|
2393
|
-
}
|
|
2394
|
-
});
|
|
2395
|
-
seq = new type("tag:yaml.org,2002:seq", {
|
|
2396
|
-
kind: "sequence",
|
|
2397
|
-
construct: function(data) {
|
|
2398
|
-
return data !== null ? data : [];
|
|
2399
|
-
}
|
|
2400
|
-
});
|
|
2401
|
-
map = new type("tag:yaml.org,2002:map", {
|
|
2402
|
-
kind: "mapping",
|
|
2403
|
-
construct: function(data) {
|
|
2404
|
-
return data !== null ? data : {};
|
|
2405
|
-
}
|
|
2406
|
-
});
|
|
2407
|
-
failsafe = new schema({
|
|
2408
|
-
explicit: [
|
|
2409
|
-
str,
|
|
2410
|
-
seq,
|
|
2411
|
-
map
|
|
2412
|
-
]
|
|
2413
|
-
});
|
|
2414
|
-
_null = new type("tag:yaml.org,2002:null", {
|
|
2415
|
-
kind: "scalar",
|
|
2416
|
-
resolve: resolveYamlNull,
|
|
2417
|
-
construct: constructYamlNull,
|
|
2418
|
-
predicate: isNull,
|
|
2419
|
-
represent: {
|
|
2420
|
-
canonical: function() {
|
|
2421
|
-
return "~";
|
|
2422
|
-
},
|
|
2423
|
-
lowercase: function() {
|
|
2424
|
-
return "null";
|
|
2425
|
-
},
|
|
2426
|
-
uppercase: function() {
|
|
2427
|
-
return "NULL";
|
|
2428
|
-
},
|
|
2429
|
-
camelcase: function() {
|
|
2430
|
-
return "Null";
|
|
2431
|
-
},
|
|
2432
|
-
empty: function() {
|
|
2433
|
-
return "";
|
|
2434
|
-
}
|
|
2435
|
-
},
|
|
2436
|
-
defaultStyle: "lowercase"
|
|
2437
|
-
});
|
|
2438
|
-
bool = new type("tag:yaml.org,2002:bool", {
|
|
2439
|
-
kind: "scalar",
|
|
2440
|
-
resolve: resolveYamlBoolean,
|
|
2441
|
-
construct: constructYamlBoolean,
|
|
2442
|
-
predicate: isBoolean,
|
|
2443
|
-
represent: {
|
|
2444
|
-
lowercase: function(object) {
|
|
2445
|
-
return object ? "true" : "false";
|
|
2446
|
-
},
|
|
2447
|
-
uppercase: function(object) {
|
|
2448
|
-
return object ? "TRUE" : "FALSE";
|
|
2449
|
-
},
|
|
2450
|
-
camelcase: function(object) {
|
|
2451
|
-
return object ? "True" : "False";
|
|
2452
|
-
}
|
|
2453
|
-
},
|
|
2454
|
-
defaultStyle: "lowercase"
|
|
2455
|
-
});
|
|
2456
|
-
int = new type("tag:yaml.org,2002:int", {
|
|
2457
|
-
kind: "scalar",
|
|
2458
|
-
resolve: resolveYamlInteger,
|
|
2459
|
-
construct: constructYamlInteger,
|
|
2460
|
-
predicate: isInteger,
|
|
2461
|
-
represent: {
|
|
2462
|
-
binary: function(obj) {
|
|
2463
|
-
return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
|
|
2464
|
-
},
|
|
2465
|
-
octal: function(obj) {
|
|
2466
|
-
return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1);
|
|
2467
|
-
},
|
|
2468
|
-
decimal: function(obj) {
|
|
2469
|
-
return obj.toString(10);
|
|
2470
|
-
},
|
|
2471
|
-
hexadecimal: function(obj) {
|
|
2472
|
-
return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
|
|
2473
|
-
}
|
|
2474
|
-
},
|
|
2475
|
-
defaultStyle: "decimal",
|
|
2476
|
-
styleAliases: {
|
|
2477
|
-
binary: [2, "bin"],
|
|
2478
|
-
octal: [8, "oct"],
|
|
2479
|
-
decimal: [10, "dec"],
|
|
2480
|
-
hexadecimal: [16, "hex"]
|
|
2481
|
-
}
|
|
2482
|
-
});
|
|
2483
|
-
YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
2484
|
-
SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
|
2485
|
-
float = new type("tag:yaml.org,2002:float", {
|
|
2486
|
-
kind: "scalar",
|
|
2487
|
-
resolve: resolveYamlFloat,
|
|
2488
|
-
construct: constructYamlFloat,
|
|
2489
|
-
predicate: isFloat,
|
|
2490
|
-
represent: representYamlFloat,
|
|
2491
|
-
defaultStyle: "lowercase"
|
|
2492
|
-
});
|
|
2493
|
-
json = failsafe.extend({
|
|
2494
|
-
implicit: [
|
|
2495
|
-
_null,
|
|
2496
|
-
bool,
|
|
2497
|
-
int,
|
|
2498
|
-
float
|
|
2499
|
-
]
|
|
2500
|
-
});
|
|
2501
|
-
core = json;
|
|
2502
|
-
YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
|
|
2503
|
-
YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
|
|
2504
|
-
timestamp = new type("tag:yaml.org,2002:timestamp", {
|
|
2505
|
-
kind: "scalar",
|
|
2506
|
-
resolve: resolveYamlTimestamp,
|
|
2507
|
-
construct: constructYamlTimestamp,
|
|
2508
|
-
instanceOf: Date,
|
|
2509
|
-
represent: representYamlTimestamp
|
|
2510
|
-
});
|
|
2511
|
-
merge = new type("tag:yaml.org,2002:merge", {
|
|
2512
|
-
kind: "scalar",
|
|
2513
|
-
resolve: resolveYamlMerge
|
|
2514
|
-
});
|
|
2515
|
-
BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
2516
|
-
binary = new type("tag:yaml.org,2002:binary", {
|
|
2517
|
-
kind: "scalar",
|
|
2518
|
-
resolve: resolveYamlBinary,
|
|
2519
|
-
construct: constructYamlBinary,
|
|
2520
|
-
predicate: isBinary,
|
|
2521
|
-
represent: representYamlBinary
|
|
2522
|
-
});
|
|
2523
|
-
_hasOwnProperty$3 = Object.prototype.hasOwnProperty;
|
|
2524
|
-
_toString$2 = Object.prototype.toString;
|
|
2525
|
-
omap = new type("tag:yaml.org,2002:omap", {
|
|
2526
|
-
kind: "sequence",
|
|
2527
|
-
resolve: resolveYamlOmap,
|
|
2528
|
-
construct: constructYamlOmap
|
|
2529
|
-
});
|
|
2530
|
-
_toString$1 = Object.prototype.toString;
|
|
2531
|
-
pairs = new type("tag:yaml.org,2002:pairs", {
|
|
2532
|
-
kind: "sequence",
|
|
2533
|
-
resolve: resolveYamlPairs,
|
|
2534
|
-
construct: constructYamlPairs
|
|
2535
|
-
});
|
|
2536
|
-
_hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
2537
|
-
set = new type("tag:yaml.org,2002:set", {
|
|
2538
|
-
kind: "mapping",
|
|
2539
|
-
resolve: resolveYamlSet,
|
|
2540
|
-
construct: constructYamlSet
|
|
2541
|
-
});
|
|
2542
|
-
_default = core.extend({
|
|
2543
|
-
implicit: [
|
|
2544
|
-
timestamp,
|
|
2545
|
-
merge
|
|
2546
|
-
],
|
|
2547
|
-
explicit: [
|
|
2548
|
-
binary,
|
|
2549
|
-
omap,
|
|
2550
|
-
pairs,
|
|
2551
|
-
set
|
|
2552
|
-
]
|
|
2553
|
-
});
|
|
2554
|
-
_hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
2555
|
-
CONTEXT_FLOW_IN = 1;
|
|
2556
|
-
CONTEXT_FLOW_OUT = 2;
|
|
2557
|
-
CONTEXT_BLOCK_IN = 3;
|
|
2558
|
-
CONTEXT_BLOCK_OUT = 4;
|
|
2559
|
-
CHOMPING_CLIP = 1;
|
|
2560
|
-
CHOMPING_STRIP = 2;
|
|
2561
|
-
CHOMPING_KEEP = 3;
|
|
2562
|
-
PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
2563
|
-
PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
|
|
2564
|
-
PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
|
|
2565
|
-
PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
|
|
2566
|
-
PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
2567
|
-
simpleEscapeCheck = new Array(256);
|
|
2568
|
-
simpleEscapeMap = new Array(256);
|
|
2569
|
-
for (i = 0;i < 256; i++) {
|
|
2570
|
-
simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
|
|
2571
|
-
simpleEscapeMap[i] = simpleEscapeSequence(i);
|
|
2572
|
-
}
|
|
2573
|
-
directiveHandlers = {
|
|
2574
|
-
YAML: function handleYamlDirective(state, name, args) {
|
|
2575
|
-
var match, major, minor;
|
|
2576
|
-
if (state.version !== null) {
|
|
2577
|
-
throwError(state, "duplication of %YAML directive");
|
|
2578
|
-
}
|
|
2579
|
-
if (args.length !== 1) {
|
|
2580
|
-
throwError(state, "YAML directive accepts exactly one argument");
|
|
2581
|
-
}
|
|
2582
|
-
match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
2583
|
-
if (match === null) {
|
|
2584
|
-
throwError(state, "ill-formed argument of the YAML directive");
|
|
2585
|
-
}
|
|
2586
|
-
major = parseInt(match[1], 10);
|
|
2587
|
-
minor = parseInt(match[2], 10);
|
|
2588
|
-
if (major !== 1) {
|
|
2589
|
-
throwError(state, "unacceptable YAML version of the document");
|
|
2590
|
-
}
|
|
2591
|
-
state.version = args[0];
|
|
2592
|
-
state.checkLineBreaks = minor < 2;
|
|
2593
|
-
if (minor !== 1 && minor !== 2) {
|
|
2594
|
-
throwWarning(state, "unsupported YAML version of the document");
|
|
2595
|
-
}
|
|
2596
|
-
},
|
|
2597
|
-
TAG: function handleTagDirective(state, name, args) {
|
|
2598
|
-
var handle, prefix;
|
|
2599
|
-
if (args.length !== 2) {
|
|
2600
|
-
throwError(state, "TAG directive accepts exactly two arguments");
|
|
2601
|
-
}
|
|
2602
|
-
handle = args[0];
|
|
2603
|
-
prefix = args[1];
|
|
2604
|
-
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
|
2605
|
-
throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
|
|
2606
|
-
}
|
|
2607
|
-
if (_hasOwnProperty$1.call(state.tagMap, handle)) {
|
|
2608
|
-
throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
|
|
2609
|
-
}
|
|
2610
|
-
if (!PATTERN_TAG_URI.test(prefix)) {
|
|
2611
|
-
throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
2612
|
-
}
|
|
2613
|
-
try {
|
|
2614
|
-
prefix = decodeURIComponent(prefix);
|
|
2615
|
-
} catch (err) {
|
|
2616
|
-
throwError(state, "tag prefix is malformed: " + prefix);
|
|
2617
|
-
}
|
|
2618
|
-
state.tagMap[handle] = prefix;
|
|
2619
|
-
}
|
|
2620
|
-
};
|
|
2621
|
-
loadAll_1 = loadAll$1;
|
|
2622
|
-
load_1 = load$1;
|
|
2623
|
-
loader = {
|
|
2624
|
-
loadAll: loadAll_1,
|
|
2625
|
-
load: load_1
|
|
2626
|
-
};
|
|
2627
|
-
_toString = Object.prototype.toString;
|
|
2628
|
-
_hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2629
|
-
CHAR_BOM = 65279;
|
|
2630
|
-
CHAR_TAB = 9;
|
|
2631
|
-
CHAR_LINE_FEED = 10;
|
|
2632
|
-
CHAR_CARRIAGE_RETURN = 13;
|
|
2633
|
-
CHAR_SPACE = 32;
|
|
2634
|
-
CHAR_EXCLAMATION = 33;
|
|
2635
|
-
CHAR_DOUBLE_QUOTE = 34;
|
|
2636
|
-
CHAR_SHARP = 35;
|
|
2637
|
-
CHAR_PERCENT = 37;
|
|
2638
|
-
CHAR_AMPERSAND = 38;
|
|
2639
|
-
CHAR_SINGLE_QUOTE = 39;
|
|
2640
|
-
CHAR_ASTERISK = 42;
|
|
2641
|
-
CHAR_COMMA = 44;
|
|
2642
|
-
CHAR_MINUS = 45;
|
|
2643
|
-
CHAR_COLON = 58;
|
|
2644
|
-
CHAR_EQUALS = 61;
|
|
2645
|
-
CHAR_GREATER_THAN = 62;
|
|
2646
|
-
CHAR_QUESTION = 63;
|
|
2647
|
-
CHAR_COMMERCIAL_AT = 64;
|
|
2648
|
-
CHAR_LEFT_SQUARE_BRACKET = 91;
|
|
2649
|
-
CHAR_RIGHT_SQUARE_BRACKET = 93;
|
|
2650
|
-
CHAR_GRAVE_ACCENT = 96;
|
|
2651
|
-
CHAR_LEFT_CURLY_BRACKET = 123;
|
|
2652
|
-
CHAR_VERTICAL_LINE = 124;
|
|
2653
|
-
CHAR_RIGHT_CURLY_BRACKET = 125;
|
|
2654
|
-
ESCAPE_SEQUENCES = {};
|
|
2655
|
-
ESCAPE_SEQUENCES[0] = "\\0";
|
|
2656
|
-
ESCAPE_SEQUENCES[7] = "\\a";
|
|
2657
|
-
ESCAPE_SEQUENCES[8] = "\\b";
|
|
2658
|
-
ESCAPE_SEQUENCES[9] = "\\t";
|
|
2659
|
-
ESCAPE_SEQUENCES[10] = "\\n";
|
|
2660
|
-
ESCAPE_SEQUENCES[11] = "\\v";
|
|
2661
|
-
ESCAPE_SEQUENCES[12] = "\\f";
|
|
2662
|
-
ESCAPE_SEQUENCES[13] = "\\r";
|
|
2663
|
-
ESCAPE_SEQUENCES[27] = "\\e";
|
|
2664
|
-
ESCAPE_SEQUENCES[34] = '\\"';
|
|
2665
|
-
ESCAPE_SEQUENCES[92] = "\\\\";
|
|
2666
|
-
ESCAPE_SEQUENCES[133] = "\\N";
|
|
2667
|
-
ESCAPE_SEQUENCES[160] = "\\_";
|
|
2668
|
-
ESCAPE_SEQUENCES[8232] = "\\L";
|
|
2669
|
-
ESCAPE_SEQUENCES[8233] = "\\P";
|
|
2670
|
-
DEPRECATED_BOOLEANS_SYNTAX = [
|
|
2671
|
-
"y",
|
|
2672
|
-
"Y",
|
|
2673
|
-
"yes",
|
|
2674
|
-
"Yes",
|
|
2675
|
-
"YES",
|
|
2676
|
-
"on",
|
|
2677
|
-
"On",
|
|
2678
|
-
"ON",
|
|
2679
|
-
"n",
|
|
2680
|
-
"N",
|
|
2681
|
-
"no",
|
|
2682
|
-
"No",
|
|
2683
|
-
"NO",
|
|
2684
|
-
"off",
|
|
2685
|
-
"Off",
|
|
2686
|
-
"OFF"
|
|
2687
|
-
];
|
|
2688
|
-
DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2689
|
-
QUOTING_TYPE_SINGLE = 1;
|
|
2690
|
-
QUOTING_TYPE_DOUBLE = 2;
|
|
2691
|
-
STYLE_PLAIN = 1;
|
|
2692
|
-
STYLE_SINGLE = 2;
|
|
2693
|
-
STYLE_LITERAL = 3;
|
|
2694
|
-
STYLE_FOLDED = 4;
|
|
2695
|
-
STYLE_DOUBLE = 5;
|
|
2696
|
-
dump_1 = dump$1;
|
|
2697
|
-
dumper = {
|
|
2698
|
-
dump: dump_1
|
|
2699
|
-
};
|
|
2700
|
-
Type = type;
|
|
2701
|
-
Schema = schema;
|
|
2702
|
-
FAILSAFE_SCHEMA = failsafe;
|
|
2703
|
-
JSON_SCHEMA = json;
|
|
2704
|
-
CORE_SCHEMA = core;
|
|
2705
|
-
DEFAULT_SCHEMA = _default;
|
|
2706
|
-
load = loader.load;
|
|
2707
|
-
loadAll = loader.loadAll;
|
|
2708
|
-
dump = dumper.dump;
|
|
2709
|
-
YAMLException = exception;
|
|
2710
|
-
types = {
|
|
2711
|
-
binary,
|
|
2712
|
-
float,
|
|
2713
|
-
map,
|
|
2714
|
-
null: _null,
|
|
2715
|
-
pairs,
|
|
2716
|
-
set,
|
|
2717
|
-
timestamp,
|
|
2718
|
-
bool,
|
|
2719
|
-
int,
|
|
2720
|
-
merge,
|
|
2721
|
-
omap,
|
|
2722
|
-
seq,
|
|
2723
|
-
str
|
|
2724
|
-
};
|
|
2725
|
-
safeLoad = renamed("safeLoad", "load");
|
|
2726
|
-
safeLoadAll = renamed("safeLoadAll", "loadAll");
|
|
2727
|
-
safeDump = renamed("safeDump", "dump");
|
|
2728
|
-
jsYaml = {
|
|
2729
|
-
Type,
|
|
2730
|
-
Schema,
|
|
2731
|
-
FAILSAFE_SCHEMA,
|
|
2732
|
-
JSON_SCHEMA,
|
|
2733
|
-
CORE_SCHEMA,
|
|
2734
|
-
DEFAULT_SCHEMA,
|
|
2735
|
-
load,
|
|
2736
|
-
loadAll,
|
|
2737
|
-
dump,
|
|
2738
|
-
YAMLException,
|
|
2739
|
-
types,
|
|
2740
|
-
safeLoad,
|
|
2741
|
-
safeLoadAll,
|
|
2742
|
-
safeDump
|
|
2743
|
-
};
|
|
2744
|
-
js_yaml_default = jsYaml;
|
|
2745
|
-
});
|
|
2746
|
-
|
|
2747
|
-
// src/index.ts
|
|
2748
|
-
var {plugin } = globalThis.Bun;
|
|
2749
|
-
await plugin({
|
|
2750
|
-
name: "YAML",
|
|
2751
|
-
async setup(build) {
|
|
2752
|
-
const { load: load2 } = await Promise.resolve().then(() => (init_js_yaml(), exports_js_yaml));
|
|
2753
|
-
build.onLoad({ filter: /\.(yaml|yml)$/ }, async (args) => {
|
|
2754
|
-
const text = await Bun.file(args.path).text();
|
|
2755
|
-
const exports = load2(text);
|
|
2756
|
-
return {
|
|
2757
|
-
exports,
|
|
2758
|
-
loader: "object"
|
|
2759
|
-
};
|
|
2760
|
-
});
|
|
2761
|
-
}
|
|
2762
|
-
});
|