@arkebcacy/beacon-cli-temp 0.1.1
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/LICENSE +19 -0
- package/README.md +438 -0
- package/dist/beacon.d.ts +3 -0
- package/dist/beacon.d.ts.map +1 -0
- package/dist/beacon.js +15 -0
- package/dist/beacon.js.map +1 -0
- package/dist/cfg/CliOptions.d.ts +7 -0
- package/dist/cfg/CliOptions.d.ts.map +1 -0
- package/dist/cfg/CliOptions.js +2 -0
- package/dist/cfg/CliOptions.js.map +1 -0
- package/dist/cfg/Config.schema.yaml +122 -0
- package/dist/cfg/ConfigMissingError.d.ts +4 -0
- package/dist/cfg/ConfigMissingError.d.ts.map +1 -0
- package/dist/cfg/ConfigMissingError.js +7 -0
- package/dist/cfg/ConfigMissingError.js.map +1 -0
- package/dist/cfg/ConfigurationError.d.ts +9 -0
- package/dist/cfg/ConfigurationError.d.ts.map +1 -0
- package/dist/cfg/ConfigurationError.js +23 -0
- package/dist/cfg/ConfigurationError.js.map +1 -0
- package/dist/cfg/createSchemaValidationFn.d.ts +3 -0
- package/dist/cfg/createSchemaValidationFn.d.ts.map +1 -0
- package/dist/cfg/createSchemaValidationFn.js +19 -0
- package/dist/cfg/createSchemaValidationFn.js.map +1 -0
- package/dist/cfg/defaultValues.d.ts +12 -0
- package/dist/cfg/defaultValues.d.ts.map +1 -0
- package/dist/cfg/defaultValues.js +11 -0
- package/dist/cfg/defaultValues.js.map +1 -0
- package/dist/cfg/loadConfig.d.ts +4 -0
- package/dist/cfg/loadConfig.d.ts.map +1 -0
- package/dist/cfg/loadConfig.js +31 -0
- package/dist/cfg/loadConfig.js.map +1 -0
- package/dist/cfg/removeDefaultValues.d.ts +3 -0
- package/dist/cfg/removeDefaultValues.d.ts.map +1 -0
- package/dist/cfg/removeDefaultValues.js +59 -0
- package/dist/cfg/removeDefaultValues.js.map +1 -0
- package/dist/cfg/resolveConfig.d.ts +4 -0
- package/dist/cfg/resolveConfig.d.ts.map +1 -0
- package/dist/cfg/resolveConfig.js +30 -0
- package/dist/cfg/resolveConfig.js.map +1 -0
- package/dist/cfg/transform/compileFilters.d.ts +6 -0
- package/dist/cfg/transform/compileFilters.d.ts.map +1 -0
- package/dist/cfg/transform/compileFilters.js +16 -0
- package/dist/cfg/transform/compileFilters.js.map +1 -0
- package/dist/cfg/transform/transform.d.ts +4 -0
- package/dist/cfg/transform/transform.d.ts.map +1 -0
- package/dist/cfg/transform/transform.js +26 -0
- package/dist/cfg/transform/transform.js.map +1 -0
- package/dist/cfg/transform/transformClientConfig.d.ts +9 -0
- package/dist/cfg/transform/transformClientConfig.d.ts.map +1 -0
- package/dist/cfg/transform/transformClientConfig.js +13 -0
- package/dist/cfg/transform/transformClientConfig.js.map +1 -0
- package/dist/cfg/transform/transformSchemaConfig.d.ts +4 -0
- package/dist/cfg/transform/transformSchemaConfig.d.ts.map +1 -0
- package/dist/cfg/transform/transformSchemaConfig.js +48 -0
- package/dist/cfg/transform/transformSchemaConfig.js.map +1 -0
- package/dist/cs/Types.d.ts +17 -0
- package/dist/cs/Types.d.ts.map +1 -0
- package/dist/cs/Types.js +17 -0
- package/dist/cs/Types.js.map +1 -0
- package/dist/cs/api/Client.d.ts +8 -0
- package/dist/cs/api/Client.d.ts.map +1 -0
- package/dist/cs/api/Client.js +40 -0
- package/dist/cs/api/Client.js.map +1 -0
- package/dist/cs/api/ContentstackError.d.ts +9 -0
- package/dist/cs/api/ContentstackError.d.ts.map +1 -0
- package/dist/cs/api/ContentstackError.js +73 -0
- package/dist/cs/api/ContentstackError.js.map +1 -0
- package/dist/cs/api/MetricMiddleware.d.ts +11 -0
- package/dist/cs/api/MetricMiddleware.d.ts.map +1 -0
- package/dist/cs/api/MetricMiddleware.js +19 -0
- package/dist/cs/api/MetricMiddleware.js.map +1 -0
- package/dist/cs/api/attachMetricCollector.d.ts +6 -0
- package/dist/cs/api/attachMetricCollector.d.ts.map +1 -0
- package/dist/cs/api/attachMetricCollector.js +10 -0
- package/dist/cs/api/attachMetricCollector.js.map +1 -0
- package/dist/cs/api/attachRateLimiter.d.ts +4 -0
- package/dist/cs/api/attachRateLimiter.d.ts.map +1 -0
- package/dist/cs/api/attachRateLimiter.js +21 -0
- package/dist/cs/api/attachRateLimiter.js.map +1 -0
- package/dist/cs/api/fileUploadInit.d.ts +5 -0
- package/dist/cs/api/fileUploadInit.d.ts.map +1 -0
- package/dist/cs/api/fileUploadInit.js +14 -0
- package/dist/cs/api/fileUploadInit.js.map +1 -0
- package/dist/cs/api/paginate/ApiResponse.d.ts +5 -0
- package/dist/cs/api/paginate/ApiResponse.d.ts.map +1 -0
- package/dist/cs/api/paginate/ApiResponse.js +2 -0
- package/dist/cs/api/paginate/ApiResponse.js.map +1 -0
- package/dist/cs/api/paginate/Batch.d.ts +7 -0
- package/dist/cs/api/paginate/Batch.d.ts.map +1 -0
- package/dist/cs/api/paginate/Batch.js +2 -0
- package/dist/cs/api/paginate/Batch.js.map +1 -0
- package/dist/cs/api/paginate/createAccumulator.d.ts +6 -0
- package/dist/cs/api/paginate/createAccumulator.d.ts.map +1 -0
- package/dist/cs/api/paginate/createAccumulator.js +18 -0
- package/dist/cs/api/paginate/createAccumulator.js.map +1 -0
- package/dist/cs/api/paginate/duplicateItemHandler.d.ts +3 -0
- package/dist/cs/api/paginate/duplicateItemHandler.d.ts.map +1 -0
- package/dist/cs/api/paginate/duplicateItemHandler.js +34 -0
- package/dist/cs/api/paginate/duplicateItemHandler.js.map +1 -0
- package/dist/cs/api/paginate/readBatch.d.ts +5 -0
- package/dist/cs/api/paginate/readBatch.d.ts.map +1 -0
- package/dist/cs/api/paginate/readBatch.js +11 -0
- package/dist/cs/api/paginate/readBatch.js.map +1 -0
- package/dist/cs/api/paginate/readPaginatedItems.d.ts +5 -0
- package/dist/cs/api/paginate/readPaginatedItems.d.ts.map +1 -0
- package/dist/cs/api/paginate/readPaginatedItems.js +53 -0
- package/dist/cs/api/paginate/readPaginatedItems.js.map +1 -0
- package/dist/cs/api/stall/ApiTimeoutError.d.ts +4 -0
- package/dist/cs/api/stall/ApiTimeoutError.d.ts.map +1 -0
- package/dist/cs/api/stall/ApiTimeoutError.js +6 -0
- package/dist/cs/api/stall/ApiTimeoutError.js.map +1 -0
- package/dist/cs/api/stall/RequestWithTimeout.d.ts +6 -0
- package/dist/cs/api/stall/RequestWithTimeout.d.ts.map +1 -0
- package/dist/cs/api/stall/RequestWithTimeout.js +15 -0
- package/dist/cs/api/stall/RequestWithTimeout.js.map +1 -0
- package/dist/cs/api/stall/TimeoutAndRetryBehavior.d.ts +12 -0
- package/dist/cs/api/stall/TimeoutAndRetryBehavior.d.ts.map +1 -0
- package/dist/cs/api/stall/TimeoutAndRetryBehavior.js +45 -0
- package/dist/cs/api/stall/TimeoutAndRetryBehavior.js.map +1 -0
- package/dist/cs/assets/Assets.d.ts +23 -0
- package/dist/cs/assets/Assets.d.ts.map +1 -0
- package/dist/cs/assets/Assets.js +108 -0
- package/dist/cs/assets/Assets.js.map +1 -0
- package/dist/cs/assets/Types.d.ts +29 -0
- package/dist/cs/assets/Types.d.ts.map +1 -0
- package/dist/cs/assets/Types.js +32 -0
- package/dist/cs/assets/Types.js.map +1 -0
- package/dist/cs/assets/create.d.ts +9 -0
- package/dist/cs/assets/create.d.ts.map +1 -0
- package/dist/cs/assets/create.js +27 -0
- package/dist/cs/assets/create.js.map +1 -0
- package/dist/cs/assets/createFolder.d.ts +4 -0
- package/dist/cs/assets/createFolder.d.ts.map +1 -0
- package/dist/cs/assets/createFolder.js +24 -0
- package/dist/cs/assets/createFolder.js.map +1 -0
- package/dist/cs/assets/delete.d.ts +3 -0
- package/dist/cs/assets/delete.d.ts.map +1 -0
- package/dist/cs/assets/delete.js +12 -0
- package/dist/cs/assets/delete.js.map +1 -0
- package/dist/cs/assets/deleteFolder.d.ts +3 -0
- package/dist/cs/assets/deleteFolder.d.ts.map +1 -0
- package/dist/cs/assets/deleteFolder.js +10 -0
- package/dist/cs/assets/deleteFolder.js.map +1 -0
- package/dist/cs/assets/index.d.ts +4 -0
- package/dist/cs/assets/index.d.ts.map +1 -0
- package/dist/cs/assets/index.js +30 -0
- package/dist/cs/assets/index.js.map +1 -0
- package/dist/cs/assets/lib/assetBody.d.ts +8 -0
- package/dist/cs/assets/lib/assetBody.d.ts.map +1 -0
- package/dist/cs/assets/lib/assetBody.js +29 -0
- package/dist/cs/assets/lib/assetBody.js.map +1 -0
- package/dist/cs/assets/lib/indexByParent.d.ts +3 -0
- package/dist/cs/assets/lib/indexByParent.d.ts.map +1 -0
- package/dist/cs/assets/lib/indexByParent.js +15 -0
- package/dist/cs/assets/lib/indexByParent.js.map +1 -0
- package/dist/cs/assets/lib/resolveRawAssetItem.d.ts +3 -0
- package/dist/cs/assets/lib/resolveRawAssetItem.d.ts.map +1 -0
- package/dist/cs/assets/lib/resolveRawAssetItem.js +20 -0
- package/dist/cs/assets/lib/resolveRawAssetItem.js.map +1 -0
- package/dist/cs/assets/update.d.ts +9 -0
- package/dist/cs/assets/update.d.ts.map +1 -0
- package/dist/cs/assets/update.js +28 -0
- package/dist/cs/assets/update.js.map +1 -0
- package/dist/cs/content-types/Types.d.ts +3 -0
- package/dist/cs/content-types/Types.d.ts.map +1 -0
- package/dist/cs/content-types/Types.js +2 -0
- package/dist/cs/content-types/Types.js.map +1 -0
- package/dist/cs/content-types/delete.d.ts +3 -0
- package/dist/cs/content-types/delete.d.ts.map +1 -0
- package/dist/cs/content-types/delete.js +15 -0
- package/dist/cs/content-types/delete.js.map +1 -0
- package/dist/cs/content-types/export.d.ts +3 -0
- package/dist/cs/content-types/export.d.ts.map +1 -0
- package/dist/cs/content-types/export.js +17 -0
- package/dist/cs/content-types/export.js.map +1 -0
- package/dist/cs/content-types/import.d.ts +4 -0
- package/dist/cs/content-types/import.d.ts.map +1 -0
- package/dist/cs/content-types/import.js +61 -0
- package/dist/cs/content-types/import.js.map +1 -0
- package/dist/cs/content-types/index.d.ts +3 -0
- package/dist/cs/content-types/index.d.ts.map +1 -0
- package/dist/cs/content-types/index.js +28 -0
- package/dist/cs/content-types/index.js.map +1 -0
- package/dist/cs/entries/Types.d.ts +10 -0
- package/dist/cs/entries/Types.d.ts.map +1 -0
- package/dist/cs/entries/Types.js +11 -0
- package/dist/cs/entries/Types.js.map +1 -0
- package/dist/cs/entries/delete.d.ts +3 -0
- package/dist/cs/entries/delete.d.ts.map +1 -0
- package/dist/cs/entries/delete.js +24 -0
- package/dist/cs/entries/delete.js.map +1 -0
- package/dist/cs/entries/export.d.ts +5 -0
- package/dist/cs/entries/export.d.ts.map +1 -0
- package/dist/cs/entries/export.js +20 -0
- package/dist/cs/entries/export.js.map +1 -0
- package/dist/cs/entries/exportEntryLocale.d.ts +5 -0
- package/dist/cs/entries/exportEntryLocale.d.ts.map +1 -0
- package/dist/cs/entries/exportEntryLocale.js +23 -0
- package/dist/cs/entries/exportEntryLocale.js.map +1 -0
- package/dist/cs/entries/getEntryLocales.d.ts +32 -0
- package/dist/cs/entries/getEntryLocales.d.ts.map +1 -0
- package/dist/cs/entries/getEntryLocales.js +50 -0
- package/dist/cs/entries/getEntryLocales.js.map +1 -0
- package/dist/cs/entries/import.d.ts +4 -0
- package/dist/cs/entries/import.d.ts.map +1 -0
- package/dist/cs/entries/import.js +8 -0
- package/dist/cs/entries/import.js.map +1 -0
- package/dist/cs/entries/index.d.ts +5 -0
- package/dist/cs/entries/index.d.ts.map +1 -0
- package/dist/cs/entries/index.js +33 -0
- package/dist/cs/entries/index.js.map +1 -0
- package/dist/cs/entries/indexAllCsEntries.d.ts +9 -0
- package/dist/cs/entries/indexAllCsEntries.d.ts.map +1 -0
- package/dist/cs/entries/indexAllCsEntries.js +50 -0
- package/dist/cs/entries/indexAllCsEntries.js.map +1 -0
- package/dist/cs/entries/lib/importCreate.d.ts +5 -0
- package/dist/cs/entries/lib/importCreate.d.ts.map +1 -0
- package/dist/cs/entries/lib/importCreate.js +20 -0
- package/dist/cs/entries/lib/importCreate.js.map +1 -0
- package/dist/cs/entries/lib/importOverwrite.d.ts +5 -0
- package/dist/cs/entries/lib/importOverwrite.d.ts.map +1 -0
- package/dist/cs/entries/lib/importOverwrite.js +74 -0
- package/dist/cs/entries/lib/importOverwrite.js.map +1 -0
- package/dist/cs/entries/lib/isEmptyEntry.d.ts +5 -0
- package/dist/cs/entries/lib/isEmptyEntry.d.ts.map +1 -0
- package/dist/cs/entries/lib/isEmptyEntry.js +60 -0
- package/dist/cs/entries/lib/isEmptyEntry.js.map +1 -0
- package/dist/cs/entries/lib/isEmptyJsonRTEValue.d.ts +2 -0
- package/dist/cs/entries/lib/isEmptyJsonRTEValue.d.ts.map +1 -0
- package/dist/cs/entries/lib/isEmptyJsonRTEValue.js +40 -0
- package/dist/cs/entries/lib/isEmptyJsonRTEValue.js.map +1 -0
- package/dist/cs/entries/lib/parseImportResponse.d.ts +6 -0
- package/dist/cs/entries/lib/parseImportResponse.d.ts.map +1 -0
- package/dist/cs/entries/lib/parseImportResponse.js +19 -0
- package/dist/cs/entries/lib/parseImportResponse.js.map +1 -0
- package/dist/cs/entries/lib/removeEmptyJsonRTEs.d.ts +5 -0
- package/dist/cs/entries/lib/removeEmptyJsonRTEs.d.ts.map +1 -0
- package/dist/cs/entries/lib/removeEmptyJsonRTEs.js +22 -0
- package/dist/cs/entries/lib/removeEmptyJsonRTEs.js.map +1 -0
- package/dist/cs/entries/parseReferencePath.d.ts +7 -0
- package/dist/cs/entries/parseReferencePath.d.ts.map +1 -0
- package/dist/cs/entries/parseReferencePath.js +8 -0
- package/dist/cs/entries/parseReferencePath.js.map +1 -0
- package/dist/cs/entryWalker/EntryWalker.d.ts +34 -0
- package/dist/cs/entryWalker/EntryWalker.d.ts.map +1 -0
- package/dist/cs/entryWalker/EntryWalker.js +77 -0
- package/dist/cs/entryWalker/EntryWalker.js.map +1 -0
- package/dist/cs/entryWalker/lib/field.d.ts +4 -0
- package/dist/cs/entryWalker/lib/field.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/field.js +21 -0
- package/dist/cs/entryWalker/lib/field.js.map +1 -0
- package/dist/cs/entryWalker/lib/globalField.d.ts +4 -0
- package/dist/cs/entryWalker/lib/globalField.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/globalField.js +30 -0
- package/dist/cs/entryWalker/lib/globalField.js.map +1 -0
- package/dist/cs/entryWalker/lib/globalFields.d.ts +4 -0
- package/dist/cs/entryWalker/lib/globalFields.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/globalFields.js +58 -0
- package/dist/cs/entryWalker/lib/globalFields.js.map +1 -0
- package/dist/cs/entryWalker/lib/group.d.ts +4 -0
- package/dist/cs/entryWalker/lib/group.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/group.js +43 -0
- package/dist/cs/entryWalker/lib/group.js.map +1 -0
- package/dist/cs/entryWalker/lib/groups.d.ts +4 -0
- package/dist/cs/entryWalker/lib/groups.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/groups.js +13 -0
- package/dist/cs/entryWalker/lib/groups.js.map +1 -0
- package/dist/cs/entryWalker/lib/modularBlock.d.ts +4 -0
- package/dist/cs/entryWalker/lib/modularBlock.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/modularBlock.js +65 -0
- package/dist/cs/entryWalker/lib/modularBlock.js.map +1 -0
- package/dist/cs/entryWalker/lib/modularBlocks.d.ts +4 -0
- package/dist/cs/entryWalker/lib/modularBlocks.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/modularBlocks.js +19 -0
- package/dist/cs/entryWalker/lib/modularBlocks.js.map +1 -0
- package/dist/cs/entryWalker/lib/node.d.ts +6 -0
- package/dist/cs/entryWalker/lib/node.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/node.js +48 -0
- package/dist/cs/entryWalker/lib/node.js.map +1 -0
- package/dist/cs/entryWalker/lib/referenceBlock.d.ts +4 -0
- package/dist/cs/entryWalker/lib/referenceBlock.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/referenceBlock.js +25 -0
- package/dist/cs/entryWalker/lib/referenceBlock.js.map +1 -0
- package/dist/cs/entryWalker/lib/resolveBlockTypes.d.ts +4 -0
- package/dist/cs/entryWalker/lib/resolveBlockTypes.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/resolveBlockTypes.js +22 -0
- package/dist/cs/entryWalker/lib/resolveBlockTypes.js.map +1 -0
- package/dist/cs/entryWalker/lib/schemaBlock.d.ts +4 -0
- package/dist/cs/entryWalker/lib/schemaBlock.d.ts.map +1 -0
- package/dist/cs/entryWalker/lib/schemaBlock.js +18 -0
- package/dist/cs/entryWalker/lib/schemaBlock.js.map +1 -0
- package/dist/cs/global-fields/delete.d.ts +3 -0
- package/dist/cs/global-fields/delete.d.ts.map +1 -0
- package/dist/cs/global-fields/delete.js +15 -0
- package/dist/cs/global-fields/delete.js.map +1 -0
- package/dist/cs/global-fields/export.d.ts +3 -0
- package/dist/cs/global-fields/export.d.ts.map +1 -0
- package/dist/cs/global-fields/export.js +13 -0
- package/dist/cs/global-fields/export.js.map +1 -0
- package/dist/cs/global-fields/import.d.ts +4 -0
- package/dist/cs/global-fields/import.d.ts.map +1 -0
- package/dist/cs/global-fields/import.js +20 -0
- package/dist/cs/global-fields/import.js.map +1 -0
- package/dist/cs/global-fields/index.d.ts +4 -0
- package/dist/cs/global-fields/index.d.ts.map +1 -0
- package/dist/cs/global-fields/index.js +19 -0
- package/dist/cs/global-fields/index.js.map +1 -0
- package/dist/cs/taxonomies/Taxonomy.d.ts +8 -0
- package/dist/cs/taxonomies/Taxonomy.d.ts.map +1 -0
- package/dist/cs/taxonomies/Taxonomy.js +8 -0
- package/dist/cs/taxonomies/Taxonomy.js.map +1 -0
- package/dist/cs/taxonomies/TaxonomyDetail.d.ts +9 -0
- package/dist/cs/taxonomies/TaxonomyDetail.d.ts.map +1 -0
- package/dist/cs/taxonomies/TaxonomyDetail.js +13 -0
- package/dist/cs/taxonomies/TaxonomyDetail.js.map +1 -0
- package/dist/cs/taxonomies/delete.d.ts +3 -0
- package/dist/cs/taxonomies/delete.d.ts.map +1 -0
- package/dist/cs/taxonomies/delete.js +15 -0
- package/dist/cs/taxonomies/delete.js.map +1 -0
- package/dist/cs/taxonomies/export.d.ts +3 -0
- package/dist/cs/taxonomies/export.d.ts.map +1 -0
- package/dist/cs/taxonomies/export.js +18 -0
- package/dist/cs/taxonomies/export.js.map +1 -0
- package/dist/cs/taxonomies/import.d.ts +4 -0
- package/dist/cs/taxonomies/import.d.ts.map +1 -0
- package/dist/cs/taxonomies/import.js +15 -0
- package/dist/cs/taxonomies/import.js.map +1 -0
- package/dist/cs/taxonomies/index.d.ts +3 -0
- package/dist/cs/taxonomies/index.d.ts.map +1 -0
- package/dist/cs/taxonomies/index.js +30 -0
- package/dist/cs/taxonomies/index.js.map +1 -0
- package/dist/cs/taxonomies/update.d.ts +4 -0
- package/dist/cs/taxonomies/update.d.ts.map +1 -0
- package/dist/cs/taxonomies/update.js +22 -0
- package/dist/cs/taxonomies/update.js.map +1 -0
- package/dist/cs/terms/Term.d.ts +8 -0
- package/dist/cs/terms/Term.d.ts.map +1 -0
- package/dist/cs/terms/Term.js +7 -0
- package/dist/cs/terms/Term.js.map +1 -0
- package/dist/cs/terms/create.d.ts +5 -0
- package/dist/cs/terms/create.d.ts.map +1 -0
- package/dist/cs/terms/create.js +24 -0
- package/dist/cs/terms/create.js.map +1 -0
- package/dist/cs/terms/move.d.ts +5 -0
- package/dist/cs/terms/move.d.ts.map +1 -0
- package/dist/cs/terms/move.js +29 -0
- package/dist/cs/terms/move.js.map +1 -0
- package/dist/cs/terms/remove.d.ts +5 -0
- package/dist/cs/terms/remove.d.ts.map +1 -0
- package/dist/cs/terms/remove.js +18 -0
- package/dist/cs/terms/remove.js.map +1 -0
- package/dist/cs/terms/update.d.ts +5 -0
- package/dist/cs/terms/update.d.ts.map +1 -0
- package/dist/cs/terms/update.js +18 -0
- package/dist/cs/terms/update.js.map +1 -0
- package/dist/cs/typecheckArray.d.ts +2 -0
- package/dist/cs/typecheckArray.d.ts.map +1 -0
- package/dist/cs/typecheckArray.js +24 -0
- package/dist/cs/typecheckArray.js.map +1 -0
- package/dist/dto/entry/BeaconReplacer.d.ts +26 -0
- package/dist/dto/entry/BeaconReplacer.d.ts.map +1 -0
- package/dist/dto/entry/BeaconReplacer.js +34 -0
- package/dist/dto/entry/BeaconReplacer.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/mapItemPathToAsset.d.ts +3 -0
- package/dist/dto/entry/beaconReplacer/lib/mapItemPathToAsset.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/mapItemPathToAsset.js +13 -0
- package/dist/dto/entry/beaconReplacer/lib/mapItemPathToAsset.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/process.d.ts +4 -0
- package/dist/dto/entry/beaconReplacer/lib/process.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/process.js +8 -0
- package/dist/dto/entry/beaconReplacer/lib/process.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processAsset.d.ts +20 -0
- package/dist/dto/entry/beaconReplacer/lib/processAsset.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processAsset.js +5 -0
- package/dist/dto/entry/beaconReplacer/lib/processAsset.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processJsonRteAsset.d.ts +3 -0
- package/dist/dto/entry/beaconReplacer/lib/processJsonRteAsset.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processJsonRteAsset.js +10 -0
- package/dist/dto/entry/beaconReplacer/lib/processJsonRteAsset.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processObject.d.ts +3 -0
- package/dist/dto/entry/beaconReplacer/lib/processObject.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processObject.js +4 -0
- package/dist/dto/entry/beaconReplacer/lib/processObject.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processReference.d.ts +7 -0
- package/dist/dto/entry/beaconReplacer/lib/processReference.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processReference.js +12 -0
- package/dist/dto/entry/beaconReplacer/lib/processReference.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processValue.d.ts +3 -0
- package/dist/dto/entry/beaconReplacer/lib/processValue.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/processValue.js +26 -0
- package/dist/dto/entry/beaconReplacer/lib/processValue.js.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/stripTaxonomies.d.ts +4 -0
- package/dist/dto/entry/beaconReplacer/lib/stripTaxonomies.d.ts.map +1 -0
- package/dist/dto/entry/beaconReplacer/lib/stripTaxonomies.js +32 -0
- package/dist/dto/entry/beaconReplacer/lib/stripTaxonomies.js.map +1 -0
- package/dist/dto/entry/fromCs.d.ts +5 -0
- package/dist/dto/entry/fromCs.d.ts.map +1 -0
- package/dist/dto/entry/fromCs.js +9 -0
- package/dist/dto/entry/fromCs.js.map +1 -0
- package/dist/dto/entry/lib/AssetReplacer.d.ts +10 -0
- package/dist/dto/entry/lib/AssetReplacer.d.ts.map +1 -0
- package/dist/dto/entry/lib/AssetReplacer.js +55 -0
- package/dist/dto/entry/lib/AssetReplacer.js.map +1 -0
- package/dist/dto/entry/lib/BooleanDefaults.d.ts +6 -0
- package/dist/dto/entry/lib/BooleanDefaults.d.ts.map +1 -0
- package/dist/dto/entry/lib/BooleanDefaults.js +21 -0
- package/dist/dto/entry/lib/BooleanDefaults.js.map +1 -0
- package/dist/dto/entry/lib/JsonRteReplacer.d.ts +10 -0
- package/dist/dto/entry/lib/JsonRteReplacer.d.ts.map +1 -0
- package/dist/dto/entry/lib/JsonRteReplacer.js +62 -0
- package/dist/dto/entry/lib/JsonRteReplacer.js.map +1 -0
- package/dist/dto/entry/lib/MinimalCtx.d.ts +7 -0
- package/dist/dto/entry/lib/MinimalCtx.d.ts.map +1 -0
- package/dist/dto/entry/lib/MinimalCtx.js +2 -0
- package/dist/dto/entry/lib/MinimalCtx.js.map +1 -0
- package/dist/dto/entry/lib/ReferenceReplacer.d.ts +10 -0
- package/dist/dto/entry/lib/ReferenceReplacer.d.ts.map +1 -0
- package/dist/dto/entry/lib/ReferenceReplacer.js +59 -0
- package/dist/dto/entry/lib/ReferenceReplacer.js.map +1 -0
- package/dist/dto/entry/lib/Replacer.d.ts +5 -0
- package/dist/dto/entry/lib/Replacer.d.ts.map +1 -0
- package/dist/dto/entry/lib/Replacer.js +2 -0
- package/dist/dto/entry/lib/Replacer.js.map +1 -0
- package/dist/dto/entry/lib/ReplacerPipeline.d.ts +9 -0
- package/dist/dto/entry/lib/ReplacerPipeline.d.ts.map +1 -0
- package/dist/dto/entry/lib/ReplacerPipeline.js +25 -0
- package/dist/dto/entry/lib/ReplacerPipeline.js.map +1 -0
- package/dist/dto/entry/lib/TaxonomyRemover.d.ts +9 -0
- package/dist/dto/entry/lib/TaxonomyRemover.d.ts.map +1 -0
- package/dist/dto/entry/lib/TaxonomyRemover.js +48 -0
- package/dist/dto/entry/lib/TaxonomyRemover.js.map +1 -0
- package/dist/dto/entry/lib/TaxonomyValue.d.ts +6 -0
- package/dist/dto/entry/lib/TaxonomyValue.d.ts.map +1 -0
- package/dist/dto/entry/lib/TaxonomyValue.js +7 -0
- package/dist/dto/entry/lib/TaxonomyValue.js.map +1 -0
- package/dist/dto/entry/lib/isJsonRteField.d.ts +8 -0
- package/dist/dto/entry/lib/isJsonRteField.d.ts.map +1 -0
- package/dist/dto/entry/lib/isJsonRteField.js +18 -0
- package/dist/dto/entry/lib/isJsonRteField.js.map +1 -0
- package/dist/dto/entry/toCs.d.ts +5 -0
- package/dist/dto/entry/toCs.d.ts.map +1 -0
- package/dist/dto/entry/toCs.js +6 -0
- package/dist/dto/entry/toCs.js.map +1 -0
- package/dist/dto/schema/fromCs.d.ts +3 -0
- package/dist/dto/schema/fromCs.d.ts.map +1 -0
- package/dist/dto/schema/fromCs.js +28 -0
- package/dist/dto/schema/fromCs.js.map +1 -0
- package/dist/dto/schema/lib/replaceBlocks.d.ts +3 -0
- package/dist/dto/schema/lib/replaceBlocks.d.ts.map +1 -0
- package/dist/dto/schema/lib/replaceBlocks.js +31 -0
- package/dist/dto/schema/lib/replaceBlocks.js.map +1 -0
- package/dist/dto/schema/lib/replaceField.d.ts +3 -0
- package/dist/dto/schema/lib/replaceField.d.ts.map +1 -0
- package/dist/dto/schema/lib/replaceField.js +42 -0
- package/dist/dto/schema/lib/replaceField.js.map +1 -0
- package/dist/dto/schema/lib/replaceGroup.d.ts +3 -0
- package/dist/dto/schema/lib/replaceGroup.d.ts.map +1 -0
- package/dist/dto/schema/lib/replaceGroup.js +12 -0
- package/dist/dto/schema/lib/replaceGroup.js.map +1 -0
- package/dist/dto/schema/lib/replaceReference.d.ts +3 -0
- package/dist/dto/schema/lib/replaceReference.d.ts.map +1 -0
- package/dist/dto/schema/lib/replaceReference.js +11 -0
- package/dist/dto/schema/lib/replaceReference.js.map +1 -0
- package/dist/dto/schema/lib/traverse.d.ts +3 -0
- package/dist/dto/schema/lib/traverse.d.ts.map +1 -0
- package/dist/dto/schema/lib/traverse.js +23 -0
- package/dist/dto/schema/lib/traverse.js.map +1 -0
- package/dist/dto/schema/toCs.d.ts +3 -0
- package/dist/dto/schema/toCs.d.ts.map +1 -0
- package/dist/dto/schema/toCs.js +39 -0
- package/dist/dto/schema/toCs.js.map +1 -0
- package/dist/dto/taxonomy/NormalizedTaxonomy.d.ts +18 -0
- package/dist/dto/taxonomy/NormalizedTaxonomy.d.ts.map +1 -0
- package/dist/dto/taxonomy/NormalizedTaxonomy.js +33 -0
- package/dist/dto/taxonomy/NormalizedTaxonomy.js.map +1 -0
- package/dist/dto/taxonomy/flatten.d.ts +4 -0
- package/dist/dto/taxonomy/flatten.d.ts.map +1 -0
- package/dist/dto/taxonomy/flatten.js +18 -0
- package/dist/dto/taxonomy/flatten.js.map +1 -0
- package/dist/dto/taxonomy/fromCs.d.ts +5 -0
- package/dist/dto/taxonomy/fromCs.d.ts.map +1 -0
- package/dist/dto/taxonomy/fromCs.js +17 -0
- package/dist/dto/taxonomy/fromCs.js.map +1 -0
- package/dist/dto/taxonomy/organize.d.ts +4 -0
- package/dist/dto/taxonomy/organize.d.ts.map +1 -0
- package/dist/dto/taxonomy/organize.js +28 -0
- package/dist/dto/taxonomy/organize.js.map +1 -0
- package/dist/dto/taxonomy/taxonomyStrategy.d.ts +4 -0
- package/dist/dto/taxonomy/taxonomyStrategy.d.ts.map +1 -0
- package/dist/dto/taxonomy/taxonomyStrategy.js +12 -0
- package/dist/dto/taxonomy/taxonomyStrategy.js.map +1 -0
- package/dist/dto/taxonomy/toCs.d.ts +4 -0
- package/dist/dto/taxonomy/toCs.d.ts.map +1 -0
- package/dist/dto/taxonomy/toCs.js +23 -0
- package/dist/dto/taxonomy/toCs.js.map +1 -0
- package/dist/fs/assets/Assets.d.ts +11 -0
- package/dist/fs/assets/Assets.d.ts.map +1 -0
- package/dist/fs/assets/Assets.js +39 -0
- package/dist/fs/assets/Assets.js.map +1 -0
- package/dist/fs/readYaml.d.ts +3 -0
- package/dist/fs/readYaml.d.ts.map +1 -0
- package/dist/fs/readYaml.js +7 -0
- package/dist/fs/readYaml.js.map +1 -0
- package/dist/fs/tryReadDir.d.ts +3 -0
- package/dist/fs/tryReadDir.d.ts.map +1 -0
- package/dist/fs/tryReadDir.js +13 -0
- package/dist/fs/tryReadDir.js.map +1 -0
- package/dist/fs/writeYaml.d.ts +3 -0
- package/dist/fs/writeYaml.d.ts.map +1 -0
- package/dist/fs/writeYaml.js +9 -0
- package/dist/fs/writeYaml.js.map +1 -0
- package/dist/schema/SchemaOperationError.d.ts +7 -0
- package/dist/schema/SchemaOperationError.d.ts.map +1 -0
- package/dist/schema/SchemaOperationError.js +15 -0
- package/dist/schema/SchemaOperationError.js.map +1 -0
- package/dist/schema/assetFolders/lib/FolderMeta.d.ts +5 -0
- package/dist/schema/assetFolders/lib/FolderMeta.d.ts.map +1 -0
- package/dist/schema/assetFolders/lib/FolderMeta.js +2 -0
- package/dist/schema/assetFolders/lib/FolderMeta.js.map +1 -0
- package/dist/schema/assetFolders/lib/indexContentstack.d.ts +4 -0
- package/dist/schema/assetFolders/lib/indexContentstack.d.ts.map +1 -0
- package/dist/schema/assetFolders/lib/indexContentstack.js +23 -0
- package/dist/schema/assetFolders/lib/indexContentstack.js.map +1 -0
- package/dist/schema/assetFolders/lib/planPush.d.ts +5 -0
- package/dist/schema/assetFolders/lib/planPush.d.ts.map +1 -0
- package/dist/schema/assetFolders/lib/planPush.js +92 -0
- package/dist/schema/assetFolders/lib/planPush.js.map +1 -0
- package/dist/schema/assetFolders/toContentstack.d.ts +3 -0
- package/dist/schema/assetFolders/toContentstack.d.ts.map +1 -0
- package/dist/schema/assetFolders/toContentstack.js +58 -0
- package/dist/schema/assetFolders/toContentstack.js.map +1 -0
- package/dist/schema/assets/AssetMeta.d.ts +10 -0
- package/dist/schema/assets/AssetMeta.d.ts.map +1 -0
- package/dist/schema/assets/AssetMeta.js +10 -0
- package/dist/schema/assets/AssetMeta.js.map +1 -0
- package/dist/schema/assets/lib/MetaSerialization.d.ts +8 -0
- package/dist/schema/assets/lib/MetaSerialization.d.ts.map +1 -0
- package/dist/schema/assets/lib/MetaSerialization.js +40 -0
- package/dist/schema/assets/lib/MetaSerialization.js.map +1 -0
- package/dist/schema/assets/lib/NamingConvention.d.ts +12 -0
- package/dist/schema/assets/lib/NamingConvention.d.ts.map +1 -0
- package/dist/schema/assets/lib/NamingConvention.js +71 -0
- package/dist/schema/assets/lib/NamingConvention.js.map +1 -0
- package/dist/schema/assets/lib/loadMetaCs.d.ts +4 -0
- package/dist/schema/assets/lib/loadMetaCs.d.ts.map +1 -0
- package/dist/schema/assets/lib/loadMetaCs.js +13 -0
- package/dist/schema/assets/lib/loadMetaCs.js.map +1 -0
- package/dist/schema/assets/lib/planPull.d.ts +4 -0
- package/dist/schema/assets/lib/planPull.d.ts.map +1 -0
- package/dist/schema/assets/lib/planPull.js +56 -0
- package/dist/schema/assets/lib/planPull.js.map +1 -0
- package/dist/schema/assets/lib/planPush.d.ts +4 -0
- package/dist/schema/assets/lib/planPush.d.ts.map +1 -0
- package/dist/schema/assets/lib/planPush.js +71 -0
- package/dist/schema/assets/lib/planPush.js.map +1 -0
- package/dist/schema/assets/lib/resolveItemPath.d.ts +3 -0
- package/dist/schema/assets/lib/resolveItemPath.d.ts.map +1 -0
- package/dist/schema/assets/lib/resolveItemPath.js +18 -0
- package/dist/schema/assets/lib/resolveItemPath.js.map +1 -0
- package/dist/schema/assets/lib/writeAssetToContentstack.d.ts +4 -0
- package/dist/schema/assets/lib/writeAssetToContentstack.d.ts.map +1 -0
- package/dist/schema/assets/lib/writeAssetToContentstack.js +20 -0
- package/dist/schema/assets/lib/writeAssetToContentstack.js.map +1 -0
- package/dist/schema/assets/lib/writeAssetToFileSystem.d.ts +4 -0
- package/dist/schema/assets/lib/writeAssetToFileSystem.d.ts.map +1 -0
- package/dist/schema/assets/lib/writeAssetToFileSystem.js +29 -0
- package/dist/schema/assets/lib/writeAssetToFileSystem.js.map +1 -0
- package/dist/schema/assets/schemaDirectory.d.ts +2 -0
- package/dist/schema/assets/schemaDirectory.d.ts.map +1 -0
- package/dist/schema/assets/schemaDirectory.js +7 -0
- package/dist/schema/assets/schemaDirectory.js.map +1 -0
- package/dist/schema/assets/toContentstack.d.ts +3 -0
- package/dist/schema/assets/toContentstack.d.ts.map +1 -0
- package/dist/schema/assets/toContentstack.js +57 -0
- package/dist/schema/assets/toContentstack.js.map +1 -0
- package/dist/schema/assets/toFilesystem.d.ts +3 -0
- package/dist/schema/assets/toFilesystem.d.ts.map +1 -0
- package/dist/schema/assets/toFilesystem.js +56 -0
- package/dist/schema/assets/toFilesystem.js.map +1 -0
- package/dist/schema/clear.d.ts +4 -0
- package/dist/schema/clear.d.ts.map +1 -0
- package/dist/schema/clear.js +87 -0
- package/dist/schema/clear.js.map +1 -0
- package/dist/schema/content-types/indexFromFilesystem.d.ts +6 -0
- package/dist/schema/content-types/indexFromFilesystem.d.ts.map +1 -0
- package/dist/schema/content-types/indexFromFilesystem.js +7 -0
- package/dist/schema/content-types/indexFromFilesystem.js.map +1 -0
- package/dist/schema/content-types/reduceToShim.d.ts +3 -0
- package/dist/schema/content-types/reduceToShim.d.ts.map +1 -0
- package/dist/schema/content-types/reduceToShim.js +20 -0
- package/dist/schema/content-types/reduceToShim.js.map +1 -0
- package/dist/schema/content-types/schemaDirectory.d.ts +2 -0
- package/dist/schema/content-types/schemaDirectory.d.ts.map +1 -0
- package/dist/schema/content-types/schemaDirectory.js +7 -0
- package/dist/schema/content-types/schemaDirectory.js.map +1 -0
- package/dist/schema/content-types/shimsToContentstack.d.ts +3 -0
- package/dist/schema/content-types/shimsToContentstack.d.ts.map +1 -0
- package/dist/schema/content-types/shimsToContentstack.js +38 -0
- package/dist/schema/content-types/shimsToContentstack.js.map +1 -0
- package/dist/schema/content-types/toContentstack.d.ts +3 -0
- package/dist/schema/content-types/toContentstack.d.ts.map +1 -0
- package/dist/schema/content-types/toContentstack.js +34 -0
- package/dist/schema/content-types/toContentstack.js.map +1 -0
- package/dist/schema/content-types/toFilesystem.d.ts +3 -0
- package/dist/schema/content-types/toFilesystem.d.ts.map +1 -0
- package/dist/schema/content-types/toFilesystem.js +41 -0
- package/dist/schema/content-types/toFilesystem.js.map +1 -0
- package/dist/schema/ctx/Ctx.d.ts +31 -0
- package/dist/schema/ctx/Ctx.d.ts.map +1 -0
- package/dist/schema/ctx/Ctx.js +68 -0
- package/dist/schema/ctx/Ctx.js.map +1 -0
- package/dist/schema/ctx/lib/CsTaxonomyCollection.d.ts +14 -0
- package/dist/schema/ctx/lib/CsTaxonomyCollection.d.ts.map +1 -0
- package/dist/schema/ctx/lib/CsTaxonomyCollection.js +35 -0
- package/dist/schema/ctx/lib/CsTaxonomyCollection.js.map +1 -0
- package/dist/schema/ctx/lib/FsTaxonomyCollection.d.ts +12 -0
- package/dist/schema/ctx/lib/FsTaxonomyCollection.d.ts.map +1 -0
- package/dist/schema/ctx/lib/FsTaxonomyCollection.js +34 -0
- package/dist/schema/ctx/lib/FsTaxonomyCollection.js.map +1 -0
- package/dist/schema/ctx/lib/TaxonomyCollection.d.ts +9 -0
- package/dist/schema/ctx/lib/TaxonomyCollection.d.ts.map +1 -0
- package/dist/schema/ctx/lib/TaxonomyCollection.js +2 -0
- package/dist/schema/ctx/lib/TaxonomyCollection.js.map +1 -0
- package/dist/schema/entries/EntryCollection.d.ts +14 -0
- package/dist/schema/entries/EntryCollection.d.ts.map +1 -0
- package/dist/schema/entries/EntryCollection.js +36 -0
- package/dist/schema/entries/EntryCollection.js.map +1 -0
- package/dist/schema/entries/clean.d.ts +3 -0
- package/dist/schema/entries/clean.d.ts.map +1 -0
- package/dist/schema/entries/clean.js +22 -0
- package/dist/schema/entries/clean.js.map +1 -0
- package/dist/schema/entries/equality.d.ts +3 -0
- package/dist/schema/entries/equality.d.ts.map +1 -0
- package/dist/schema/entries/equality.js +6 -0
- package/dist/schema/entries/equality.js.map +1 -0
- package/dist/schema/entries/indexAllFsEntries.d.ts +4 -0
- package/dist/schema/entries/indexAllFsEntries.d.ts.map +1 -0
- package/dist/schema/entries/indexAllFsEntries.js +110 -0
- package/dist/schema/entries/indexAllFsEntries.js.map +1 -0
- package/dist/schema/entries/lib/buildCreator.d.ts +6 -0
- package/dist/schema/entries/lib/buildCreator.d.ts.map +1 -0
- package/dist/schema/entries/lib/buildCreator.js +104 -0
- package/dist/schema/entries/lib/buildCreator.js.map +1 -0
- package/dist/schema/entries/lib/generateFilenames.d.ts +3 -0
- package/dist/schema/entries/lib/generateFilenames.d.ts.map +1 -0
- package/dist/schema/entries/lib/generateFilenames.js +56 -0
- package/dist/schema/entries/lib/generateFilenames.js.map +1 -0
- package/dist/schema/entries/lib/loadEntryLocales.d.ts +32 -0
- package/dist/schema/entries/lib/loadEntryLocales.d.ts.map +1 -0
- package/dist/schema/entries/lib/loadEntryLocales.js +84 -0
- package/dist/schema/entries/lib/loadEntryLocales.js.map +1 -0
- package/dist/schema/entries/lib/normalize.d.ts +5 -0
- package/dist/schema/entries/lib/normalize.d.ts.map +1 -0
- package/dist/schema/entries/lib/normalize.js +41 -0
- package/dist/schema/entries/lib/normalize.js.map +1 -0
- package/dist/schema/entries/schemaDirectory.d.ts +2 -0
- package/dist/schema/entries/schemaDirectory.d.ts.map +1 -0
- package/dist/schema/entries/schemaDirectory.js +7 -0
- package/dist/schema/entries/schemaDirectory.js.map +1 -0
- package/dist/schema/entries/toContentstack.d.ts +5 -0
- package/dist/schema/entries/toContentstack.d.ts.map +1 -0
- package/dist/schema/entries/toContentstack.js +87 -0
- package/dist/schema/entries/toContentstack.js.map +1 -0
- package/dist/schema/entries/toFilesystem.d.ts +5 -0
- package/dist/schema/entries/toFilesystem.d.ts.map +1 -0
- package/dist/schema/entries/toFilesystem.js +103 -0
- package/dist/schema/entries/toFilesystem.js.map +1 -0
- package/dist/schema/entries/updateMissedReferences.d.ts +4 -0
- package/dist/schema/entries/updateMissedReferences.d.ts.map +1 -0
- package/dist/schema/entries/updateMissedReferences.js +58 -0
- package/dist/schema/entries/updateMissedReferences.js.map +1 -0
- package/dist/schema/global-fields/schemaDirectory.d.ts +2 -0
- package/dist/schema/global-fields/schemaDirectory.d.ts.map +1 -0
- package/dist/schema/global-fields/schemaDirectory.js +7 -0
- package/dist/schema/global-fields/schemaDirectory.js.map +1 -0
- package/dist/schema/global-fields/toContentstack.d.ts +3 -0
- package/dist/schema/global-fields/toContentstack.d.ts.map +1 -0
- package/dist/schema/global-fields/toContentstack.js +37 -0
- package/dist/schema/global-fields/toContentstack.js.map +1 -0
- package/dist/schema/global-fields/toFilesystem.d.ts +3 -0
- package/dist/schema/global-fields/toFilesystem.d.ts.map +1 -0
- package/dist/schema/global-fields/toFilesystem.js +43 -0
- package/dist/schema/global-fields/toFilesystem.js.map +1 -0
- package/dist/schema/isEquivalentSchema.d.ts +3 -0
- package/dist/schema/isEquivalentSchema.d.ts.map +1 -0
- package/dist/schema/isEquivalentSchema.js +20 -0
- package/dist/schema/isEquivalentSchema.js.map +1 -0
- package/dist/schema/lib/PushResults.d.ts +7 -0
- package/dist/schema/lib/PushResults.d.ts.map +1 -0
- package/dist/schema/lib/PushResults.js +11 -0
- package/dist/schema/lib/PushResults.js.map +1 -0
- package/dist/schema/lib/SchemaUi.d.ts +5 -0
- package/dist/schema/lib/SchemaUi.d.ts.map +1 -0
- package/dist/schema/lib/SchemaUi.js +10 -0
- package/dist/schema/lib/SchemaUi.js.map +1 -0
- package/dist/schema/lib/createProgressBar.d.ts +2 -0
- package/dist/schema/lib/createProgressBar.d.ts.map +1 -0
- package/dist/schema/lib/createProgressBar.js +6 -0
- package/dist/schema/lib/createProgressBar.js.map +1 -0
- package/dist/schema/lib/pullModules.d.ts +4 -0
- package/dist/schema/lib/pullModules.d.ts.map +1 -0
- package/dist/schema/lib/pullModules.js +52 -0
- package/dist/schema/lib/pullModules.js.map +1 -0
- package/dist/schema/normalize.d.ts +9 -0
- package/dist/schema/normalize.d.ts.map +1 -0
- package/dist/schema/normalize.js +47 -0
- package/dist/schema/normalize.js.map +1 -0
- package/dist/schema/pull.d.ts +6 -0
- package/dist/schema/pull.d.ts.map +1 -0
- package/dist/schema/pull.js +20 -0
- package/dist/schema/pull.js.map +1 -0
- package/dist/schema/push.d.ts +3 -0
- package/dist/schema/push.d.ts.map +1 -0
- package/dist/schema/push.js +78 -0
- package/dist/schema/push.js.map +1 -0
- package/dist/schema/references/ReferenceMap.d.ts +16 -0
- package/dist/schema/references/ReferenceMap.d.ts.map +1 -0
- package/dist/schema/references/ReferenceMap.js +66 -0
- package/dist/schema/references/ReferenceMap.js.map +1 -0
- package/dist/schema/taxonomies/lib/indexCs.d.ts +4 -0
- package/dist/schema/taxonomies/lib/indexCs.d.ts.map +1 -0
- package/dist/schema/taxonomies/lib/indexCs.js +67 -0
- package/dist/schema/taxonomies/lib/indexCs.js.map +1 -0
- package/dist/schema/taxonomies/lib/indexFs.d.ts +3 -0
- package/dist/schema/taxonomies/lib/indexFs.d.ts.map +1 -0
- package/dist/schema/taxonomies/lib/indexFs.js +7 -0
- package/dist/schema/taxonomies/lib/indexFs.js.map +1 -0
- package/dist/schema/taxonomies/schemaDirectory.d.ts +2 -0
- package/dist/schema/taxonomies/schemaDirectory.d.ts.map +1 -0
- package/dist/schema/taxonomies/schemaDirectory.js +7 -0
- package/dist/schema/taxonomies/schemaDirectory.js.map +1 -0
- package/dist/schema/taxonomies/toContentstack.d.ts +3 -0
- package/dist/schema/taxonomies/toContentstack.d.ts.map +1 -0
- package/dist/schema/taxonomies/toContentstack.js +32 -0
- package/dist/schema/taxonomies/toContentstack.js.map +1 -0
- package/dist/schema/taxonomies/toFilesystem.d.ts +3 -0
- package/dist/schema/taxonomies/toFilesystem.d.ts.map +1 -0
- package/dist/schema/taxonomies/toFilesystem.js +37 -0
- package/dist/schema/taxonomies/toFilesystem.js.map +1 -0
- package/dist/schema/terms/collection/Collection.d.ts +31 -0
- package/dist/schema/terms/collection/Collection.d.ts.map +1 -0
- package/dist/schema/terms/collection/Collection.js +58 -0
- package/dist/schema/terms/collection/Collection.js.map +1 -0
- package/dist/schema/terms/collection/lib/MutableTerm.d.ts +7 -0
- package/dist/schema/terms/collection/lib/MutableTerm.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/MutableTerm.js +2 -0
- package/dist/schema/terms/collection/lib/MutableTerm.js.map +1 -0
- package/dist/schema/terms/collection/lib/create.d.ts +6 -0
- package/dist/schema/terms/collection/lib/create.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/create.js +35 -0
- package/dist/schema/terms/collection/lib/create.js.map +1 -0
- package/dist/schema/terms/collection/lib/descendants.d.ts +4 -0
- package/dist/schema/terms/collection/lib/descendants.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/descendants.js +8 -0
- package/dist/schema/terms/collection/lib/descendants.js.map +1 -0
- package/dist/schema/terms/collection/lib/getRequired.d.ts +4 -0
- package/dist/schema/terms/collection/lib/getRequired.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/getRequired.js +8 -0
- package/dist/schema/terms/collection/lib/getRequired.js.map +1 -0
- package/dist/schema/terms/collection/lib/getSiblingContext.d.ts +9 -0
- package/dist/schema/terms/collection/lib/getSiblingContext.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/getSiblingContext.js +12 -0
- package/dist/schema/terms/collection/lib/getSiblingContext.js.map +1 -0
- package/dist/schema/terms/collection/lib/insertTermIntoSiblings.d.ts +4 -0
- package/dist/schema/terms/collection/lib/insertTermIntoSiblings.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/insertTermIntoSiblings.js +16 -0
- package/dist/schema/terms/collection/lib/insertTermIntoSiblings.js.map +1 -0
- package/dist/schema/terms/collection/lib/move.d.ts +6 -0
- package/dist/schema/terms/collection/lib/move.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/move.js +41 -0
- package/dist/schema/terms/collection/lib/move.js.map +1 -0
- package/dist/schema/terms/collection/lib/remove.d.ts +6 -0
- package/dist/schema/terms/collection/lib/remove.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/remove.js +68 -0
- package/dist/schema/terms/collection/lib/remove.js.map +1 -0
- package/dist/schema/terms/collection/lib/update.d.ts +6 -0
- package/dist/schema/terms/collection/lib/update.d.ts.map +1 -0
- package/dist/schema/terms/collection/lib/update.js +38 -0
- package/dist/schema/terms/collection/lib/update.js.map +1 -0
- package/dist/schema/terms/lib/ActionType.d.ts +3 -0
- package/dist/schema/terms/lib/ActionType.d.ts.map +1 -0
- package/dist/schema/terms/lib/ActionType.js +2 -0
- package/dist/schema/terms/lib/ActionType.js.map +1 -0
- package/dist/schema/terms/lib/TermAction.d.ts +9 -0
- package/dist/schema/terms/lib/TermAction.d.ts.map +1 -0
- package/dist/schema/terms/lib/TermAction.js +2 -0
- package/dist/schema/terms/lib/TermAction.js.map +1 -0
- package/dist/schema/terms/lib/deletions.d.ts +5 -0
- package/dist/schema/terms/lib/deletions.d.ts.map +1 -0
- package/dist/schema/terms/lib/deletions.js +24 -0
- package/dist/schema/terms/lib/deletions.js.map +1 -0
- package/dist/schema/terms/lib/filterTaxonomies.d.ts +3 -0
- package/dist/schema/terms/lib/filterTaxonomies.d.ts.map +1 -0
- package/dist/schema/terms/lib/filterTaxonomies.js +12 -0
- package/dist/schema/terms/lib/filterTaxonomies.js.map +1 -0
- package/dist/schema/terms/lib/mutations.d.ts +5 -0
- package/dist/schema/terms/lib/mutations.d.ts.map +1 -0
- package/dist/schema/terms/lib/mutations.js +46 -0
- package/dist/schema/terms/lib/mutations.js.map +1 -0
- package/dist/schema/terms/lib/processActions.d.ts +5 -0
- package/dist/schema/terms/lib/processActions.d.ts.map +1 -0
- package/dist/schema/terms/lib/processActions.js +31 -0
- package/dist/schema/terms/lib/processActions.js.map +1 -0
- package/dist/schema/terms/toContentstack.d.ts +4 -0
- package/dist/schema/terms/toContentstack.d.ts.map +1 -0
- package/dist/schema/terms/toContentstack.js +22 -0
- package/dist/schema/terms/toContentstack.js.map +1 -0
- package/dist/schema/xfer/Filename.d.ts +3 -0
- package/dist/schema/xfer/Filename.d.ts.map +1 -0
- package/dist/schema/xfer/Filename.js +3 -0
- package/dist/schema/xfer/Filename.js.map +1 -0
- package/dist/schema/xfer/TransferResults.d.ts +16 -0
- package/dist/schema/xfer/TransferResults.d.ts.map +1 -0
- package/dist/schema/xfer/TransferResults.js +45 -0
- package/dist/schema/xfer/TransferResults.js.map +1 -0
- package/dist/schema/xfer/indexFromFilesystem.d.ts +5 -0
- package/dist/schema/xfer/indexFromFilesystem.d.ts.map +1 -0
- package/dist/schema/xfer/indexFromFilesystem.js +30 -0
- package/dist/schema/xfer/indexFromFilesystem.js.map +1 -0
- package/dist/schema/xfer/lib/MergePlan.d.ts +7 -0
- package/dist/schema/xfer/lib/MergePlan.d.ts.map +1 -0
- package/dist/schema/xfer/lib/MergePlan.js +2 -0
- package/dist/schema/xfer/lib/MergePlan.js.map +1 -0
- package/dist/schema/xfer/lib/handleCreations.d.ts +3 -0
- package/dist/schema/xfer/lib/handleCreations.d.ts.map +1 -0
- package/dist/schema/xfer/lib/handleCreations.js +31 -0
- package/dist/schema/xfer/lib/handleCreations.js.map +1 -0
- package/dist/schema/xfer/lib/handleDeletions.d.ts +8 -0
- package/dist/schema/xfer/lib/handleDeletions.d.ts.map +1 -0
- package/dist/schema/xfer/lib/handleDeletions.js +58 -0
- package/dist/schema/xfer/lib/handleDeletions.js.map +1 -0
- package/dist/schema/xfer/lib/handleUnmodified.d.ts +3 -0
- package/dist/schema/xfer/lib/handleUnmodified.d.ts.map +1 -0
- package/dist/schema/xfer/lib/handleUnmodified.js +11 -0
- package/dist/schema/xfer/lib/handleUnmodified.js.map +1 -0
- package/dist/schema/xfer/lib/handleUpdates.d.ts +3 -0
- package/dist/schema/xfer/lib/handleUpdates.d.ts.map +1 -0
- package/dist/schema/xfer/lib/handleUpdates.js +31 -0
- package/dist/schema/xfer/lib/handleUpdates.js.map +1 -0
- package/dist/schema/xfer/lib/planMerge.d.ts +3 -0
- package/dist/schema/xfer/lib/planMerge.d.ts.map +1 -0
- package/dist/schema/xfer/lib/planMerge.js +24 -0
- package/dist/schema/xfer/lib/planMerge.js.map +1 -0
- package/dist/schema/xfer/lib/processPlan.d.ts +13 -0
- package/dist/schema/xfer/lib/processPlan.d.ts.map +1 -0
- package/dist/schema/xfer/lib/processPlan.js +38 -0
- package/dist/schema/xfer/lib/processPlan.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/ui/HandledError.d.ts +6 -0
- package/dist/ui/HandledError.d.ts.map +1 -0
- package/dist/ui/HandledError.js +25 -0
- package/dist/ui/HandledError.js.map +1 -0
- package/dist/ui/LogContext.d.ts +6 -0
- package/dist/ui/LogContext.d.ts.map +1 -0
- package/dist/ui/LogContext.js +2 -0
- package/dist/ui/LogContext.js.map +1 -0
- package/dist/ui/Options.d.ts +30 -0
- package/dist/ui/Options.d.ts.map +1 -0
- package/dist/ui/Options.js +4 -0
- package/dist/ui/Options.js.map +1 -0
- package/dist/ui/PartialOptions.d.ts +7 -0
- package/dist/ui/PartialOptions.d.ts.map +1 -0
- package/dist/ui/PartialOptions.js +2 -0
- package/dist/ui/PartialOptions.js.map +1 -0
- package/dist/ui/UiContext.d.ts +24 -0
- package/dist/ui/UiContext.d.ts.map +1 -0
- package/dist/ui/UiContext.js +59 -0
- package/dist/ui/UiContext.js.map +1 -0
- package/dist/ui/UiOptions.d.ts +9 -0
- package/dist/ui/UiOptions.d.ts.map +1 -0
- package/dist/ui/UiOptions.js +60 -0
- package/dist/ui/UiOptions.js.map +1 -0
- package/dist/ui/command/clear.d.ts +4 -0
- package/dist/ui/command/clear.d.ts.map +1 -0
- package/dist/ui/command/clear.js +81 -0
- package/dist/ui/command/clear.js.map +1 -0
- package/dist/ui/command/pull.d.ts +4 -0
- package/dist/ui/command/pull.d.ts.map +1 -0
- package/dist/ui/command/pull.js +94 -0
- package/dist/ui/command/pull.js.map +1 -0
- package/dist/ui/command/push.d.ts +4 -0
- package/dist/ui/command/push.d.ts.map +1 -0
- package/dist/ui/command/push.js +98 -0
- package/dist/ui/command/push.js.map +1 -0
- package/dist/ui/createStylus.d.ts +3 -0
- package/dist/ui/createStylus.d.ts.map +1 -0
- package/dist/ui/createStylus.js +12 -0
- package/dist/ui/createStylus.js.map +1 -0
- package/dist/ui/humanizeList.d.ts +6 -0
- package/dist/ui/humanizeList.d.ts.map +1 -0
- package/dist/ui/humanizeList.js +56 -0
- package/dist/ui/humanizeList.js.map +1 -0
- package/dist/ui/humanizePath.d.ts +2 -0
- package/dist/ui/humanizePath.d.ts.map +1 -0
- package/dist/ui/humanizePath.js +12 -0
- package/dist/ui/humanizePath.js.map +1 -0
- package/dist/ui/logApiPerformance.d.ts +4 -0
- package/dist/ui/logApiPerformance.d.ts.map +1 -0
- package/dist/ui/logApiPerformance.js +78 -0
- package/dist/ui/logApiPerformance.js.map +1 -0
- package/dist/ui/logOptions.d.ts +3 -0
- package/dist/ui/logOptions.d.ts.map +1 -0
- package/dist/ui/logOptions.js +33 -0
- package/dist/ui/logOptions.js.map +1 -0
- package/dist/ui/logResults.d.ts +6 -0
- package/dist/ui/logResults.d.ts.map +1 -0
- package/dist/ui/logResults.js +75 -0
- package/dist/ui/logResults.js.map +1 -0
- package/dist/ui/option/apiKey.d.ts +8 -0
- package/dist/ui/option/apiKey.d.ts.map +1 -0
- package/dist/ui/option/apiKey.js +6 -0
- package/dist/ui/option/apiKey.js.map +1 -0
- package/dist/ui/option/apiTimeout.d.ts +9 -0
- package/dist/ui/option/apiTimeout.d.ts.map +1 -0
- package/dist/ui/option/apiTimeout.js +14 -0
- package/dist/ui/option/apiTimeout.js.map +1 -0
- package/dist/ui/option/baseUrl.d.ts +8 -0
- package/dist/ui/option/baseUrl.d.ts.map +1 -0
- package/dist/ui/option/baseUrl.js +15 -0
- package/dist/ui/option/baseUrl.js.map +1 -0
- package/dist/ui/option/branch.d.ts +9 -0
- package/dist/ui/option/branch.d.ts.map +1 -0
- package/dist/ui/option/branch.js +9 -0
- package/dist/ui/option/branch.js.map +1 -0
- package/dist/ui/option/commonOptions.d.ts +5 -0
- package/dist/ui/option/commonOptions.d.ts.map +1 -0
- package/dist/ui/option/commonOptions.js +13 -0
- package/dist/ui/option/commonOptions.js.map +1 -0
- package/dist/ui/option/configFile.d.ts +8 -0
- package/dist/ui/option/configFile.d.ts.map +1 -0
- package/dist/ui/option/configFile.js +9 -0
- package/dist/ui/option/configFile.js.map +1 -0
- package/dist/ui/option/deletionStrategy.d.ts +9 -0
- package/dist/ui/option/deletionStrategy.d.ts.map +1 -0
- package/dist/ui/option/deletionStrategy.js +9 -0
- package/dist/ui/option/deletionStrategy.js.map +1 -0
- package/dist/ui/option/environment.d.ts +7 -0
- package/dist/ui/option/environment.d.ts.map +1 -0
- package/dist/ui/option/environment.js +4 -0
- package/dist/ui/option/environment.js.map +1 -0
- package/dist/ui/option/extension.d.ts +8 -0
- package/dist/ui/option/extension.d.ts.map +1 -0
- package/dist/ui/option/extension.js +6 -0
- package/dist/ui/option/extension.js.map +1 -0
- package/dist/ui/option/index.d.ts +25 -0
- package/dist/ui/option/index.d.ts.map +1 -0
- package/dist/ui/option/index.js +13 -0
- package/dist/ui/option/index.js.map +1 -0
- package/dist/ui/option/jsonRtePlugin.d.ts +8 -0
- package/dist/ui/option/jsonRtePlugin.d.ts.map +1 -0
- package/dist/ui/option/jsonRtePlugin.js +6 -0
- package/dist/ui/option/jsonRtePlugin.js.map +1 -0
- package/dist/ui/option/managementToken.d.ts +8 -0
- package/dist/ui/option/managementToken.d.ts.map +1 -0
- package/dist/ui/option/managementToken.js +8 -0
- package/dist/ui/option/managementToken.js.map +1 -0
- package/dist/ui/option/schemaPath.d.ts +9 -0
- package/dist/ui/option/schemaPath.d.ts.map +1 -0
- package/dist/ui/option/schemaPath.js +9 -0
- package/dist/ui/option/schemaPath.js.map +1 -0
- package/dist/ui/option/verbose.d.ts +8 -0
- package/dist/ui/option/verbose.d.ts.map +1 -0
- package/dist/ui/option/verbose.js +4 -0
- package/dist/ui/option/verbose.js.map +1 -0
- package/dist/ui/parser/mapParser.d.ts +7 -0
- package/dist/ui/parser/mapParser.d.ts.map +1 -0
- package/dist/ui/parser/mapParser.js +33 -0
- package/dist/ui/parser/mapParser.js.map +1 -0
- package/dist/ui/parser/noEmptyStringsFor.d.ts +2 -0
- package/dist/ui/parser/noEmptyStringsFor.d.ts.map +1 -0
- package/dist/ui/parser/noEmptyStringsFor.js +11 -0
- package/dist/ui/parser/noEmptyStringsFor.js.map +1 -0
- package/dist/ui/progress/Payload.d.ts +8 -0
- package/dist/ui/progress/Payload.d.ts.map +1 -0
- package/dist/ui/progress/Payload.js +26 -0
- package/dist/ui/progress/Payload.js.map +1 -0
- package/dist/ui/progress/ProgressBar.d.ts +6 -0
- package/dist/ui/progress/ProgressBar.d.ts.map +1 -0
- package/dist/ui/progress/ProgressBar.js +2 -0
- package/dist/ui/progress/ProgressBar.js.map +1 -0
- package/dist/ui/progress/ProgressReporter.d.ts +11 -0
- package/dist/ui/progress/ProgressReporter.d.ts.map +1 -0
- package/dist/ui/progress/ProgressReporter.js +36 -0
- package/dist/ui/progress/ProgressReporter.js.map +1 -0
- package/dist/ui/progress/StyledText.d.ts +5 -0
- package/dist/ui/progress/StyledText.d.ts.map +1 -0
- package/dist/ui/progress/StyledText.js +2 -0
- package/dist/ui/progress/StyledText.js.map +1 -0
- package/dist/ui/progress/UiProgressBar.d.ts +12 -0
- package/dist/ui/progress/UiProgressBar.d.ts.map +1 -0
- package/dist/ui/progress/UiProgressBar.js +25 -0
- package/dist/ui/progress/UiProgressBar.js.map +1 -0
- package/dist/ui/progress/VerboseProgressBar.d.ts +14 -0
- package/dist/ui/progress/VerboseProgressBar.d.ts.map +1 -0
- package/dist/ui/progress/VerboseProgressBar.js +54 -0
- package/dist/ui/progress/VerboseProgressBar.js.map +1 -0
- package/dist/ui/progress/createEmitter.d.ts +3 -0
- package/dist/ui/progress/createEmitter.d.ts.map +1 -0
- package/dist/ui/progress/createEmitter.js +16 -0
- package/dist/ui/progress/createEmitter.js.map +1 -0
- package/dist/ui/progress/formatAction.d.ts +4 -0
- package/dist/ui/progress/formatAction.d.ts.map +1 -0
- package/dist/ui/progress/formatAction.js +13 -0
- package/dist/ui/progress/formatAction.js.map +1 -0
- package/dist/ui/progress/formatCounter.d.ts +5 -0
- package/dist/ui/progress/formatCounter.d.ts.map +1 -0
- package/dist/ui/progress/formatCounter.js +14 -0
- package/dist/ui/progress/formatCounter.js.map +1 -0
- package/dist/ui/progress/formatElapsed.d.ts +3 -0
- package/dist/ui/progress/formatElapsed.d.ts.map +1 -0
- package/dist/ui/progress/formatElapsed.js +17 -0
- package/dist/ui/progress/formatElapsed.js.map +1 -0
- package/dist/ui/progress/formatName.d.ts +3 -0
- package/dist/ui/progress/formatName.d.ts.map +1 -0
- package/dist/ui/progress/formatName.js +9 -0
- package/dist/ui/progress/formatName.js.map +1 -0
- package/dist/ui/progress/formatProgress.d.ts +4 -0
- package/dist/ui/progress/formatProgress.d.ts.map +1 -0
- package/dist/ui/progress/formatProgress.js +48 -0
- package/dist/ui/progress/formatProgress.js.map +1 -0
- package/dist/ui/version.d.ts +2 -0
- package/dist/ui/version.d.ts.map +1 -0
- package/dist/ui/version.js +21 -0
- package/dist/ui/version.js.map +1 -0
- package/dist/util/OmitIndex.d.ts +5 -0
- package/dist/util/OmitIndex.d.ts.map +1 -0
- package/dist/util/OmitIndex.js +2 -0
- package/dist/util/OmitIndex.js.map +1 -0
- package/dist/util/escapeRegex.d.ts +16 -0
- package/dist/util/escapeRegex.d.ts.map +1 -0
- package/dist/util/escapeRegex.js +18 -0
- package/dist/util/escapeRegex.js.map +1 -0
- package/dist/util/isRecord.d.ts +2 -0
- package/dist/util/isRecord.d.ts.map +1 -0
- package/dist/util/isRecord.js +4 -0
- package/dist/util/isRecord.js.map +1 -0
- package/package.json +54 -0
- package/src/beacon.ts +18 -0
- package/src/cfg/CliOptions.ts +7 -0
- package/src/cfg/Config.schema.d.yaml.ts +94 -0
- package/src/cfg/Config.schema.yaml +122 -0
- package/src/cfg/ConfigMissingError.ts +6 -0
- package/src/cfg/ConfigurationError.ts +28 -0
- package/src/cfg/createSchemaValidationFn.ts +23 -0
- package/src/cfg/defaultValues.ts +12 -0
- package/src/cfg/loadConfig.test.ts +103 -0
- package/src/cfg/loadConfig.ts +44 -0
- package/src/cfg/removeDefaultValues.ts +87 -0
- package/src/cfg/resolveConfig.ts +46 -0
- package/src/cfg/transform/compileFilters.ts +27 -0
- package/src/cfg/transform/transform.ts +36 -0
- package/src/cfg/transform/transformClientConfig.ts +26 -0
- package/src/cfg/transform/transformSchemaConfig.test.ts +58 -0
- package/src/cfg/transform/transformSchemaConfig.ts +86 -0
- package/src/cs/Types.ts +35 -0
- package/src/cs/api/Client.ts +50 -0
- package/src/cs/api/ContentstackError.test.ts +18 -0
- package/src/cs/api/ContentstackError.ts +103 -0
- package/src/cs/api/MetricMiddleware.ts +24 -0
- package/src/cs/api/attachMetricCollector.ts +16 -0
- package/src/cs/api/attachRateLimiter.ts +30 -0
- package/src/cs/api/cma-openapi-3.d.ts +9920 -0
- package/src/cs/api/fileUploadInit.ts +19 -0
- package/src/cs/api/paginate/ApiResponse.ts +4 -0
- package/src/cs/api/paginate/Batch.ts +18 -0
- package/src/cs/api/paginate/createAccumulator.ts +26 -0
- package/src/cs/api/paginate/duplicateItemHandler.ts +49 -0
- package/src/cs/api/paginate/readBatch.ts +21 -0
- package/src/cs/api/paginate/readPaginatedItems.ts +64 -0
- package/src/cs/api/stall/ApiTimeoutError.ts +5 -0
- package/src/cs/api/stall/RequestWithTimeout.ts +22 -0
- package/src/cs/api/stall/TimeoutAndRetryBehavior.ts +44 -0
- package/src/cs/assets/Assets.ts +152 -0
- package/src/cs/assets/Types.test.ts +31 -0
- package/src/cs/assets/Types.ts +69 -0
- package/src/cs/assets/create.ts +46 -0
- package/src/cs/assets/createFolder.ts +39 -0
- package/src/cs/assets/delete.ts +15 -0
- package/src/cs/assets/deleteFolder.ts +19 -0
- package/src/cs/assets/index.ts +48 -0
- package/src/cs/assets/lib/assetBody.ts +52 -0
- package/src/cs/assets/lib/indexByParent.ts +20 -0
- package/src/cs/assets/lib/resolveRawAssetItem.ts +25 -0
- package/src/cs/assets/update.ts +47 -0
- package/src/cs/content-types/Types.ts +4 -0
- package/src/cs/content-types/delete.ts +21 -0
- package/src/cs/content-types/export.ts +25 -0
- package/src/cs/content-types/import.ts +88 -0
- package/src/cs/content-types/index.ts +38 -0
- package/src/cs/entries/Types.ts +21 -0
- package/src/cs/entries/delete.ts +37 -0
- package/src/cs/entries/export.ts +34 -0
- package/src/cs/entries/exportEntryLocale.test.ts +107 -0
- package/src/cs/entries/exportEntryLocale.ts +38 -0
- package/src/cs/entries/getEntryLocales.test.ts +106 -0
- package/src/cs/entries/getEntryLocales.ts +81 -0
- package/src/cs/entries/import.ts +16 -0
- package/src/cs/entries/index.ts +56 -0
- package/src/cs/entries/indexAllCsEntries.ts +50 -0
- package/src/cs/entries/lib/importCreate.ts +34 -0
- package/src/cs/entries/lib/importOverwrite.ts +111 -0
- package/src/cs/entries/lib/isEmptyEntry.test.ts +133 -0
- package/src/cs/entries/lib/isEmptyEntry.ts +82 -0
- package/src/cs/entries/lib/isEmptyJsonRTEValue.test.ts +83 -0
- package/src/cs/entries/lib/isEmptyJsonRTEValue.ts +56 -0
- package/src/cs/entries/lib/parseImportResponse.ts +32 -0
- package/src/cs/entries/lib/removeEmptyJsonRTEs.ts +33 -0
- package/src/cs/entries/parseReferencePath.ts +15 -0
- package/src/cs/entryWalker/EntryWalker.ts +86 -0
- package/src/cs/entryWalker/lib/field.ts +31 -0
- package/src/cs/entryWalker/lib/globalField.ts +41 -0
- package/src/cs/entryWalker/lib/globalFields.ts +78 -0
- package/src/cs/entryWalker/lib/group.ts +56 -0
- package/src/cs/entryWalker/lib/groups.ts +20 -0
- package/src/cs/entryWalker/lib/modularBlock.ts +101 -0
- package/src/cs/entryWalker/lib/modularBlocks.ts +27 -0
- package/src/cs/entryWalker/lib/node.ts +70 -0
- package/src/cs/entryWalker/lib/referenceBlock.ts +36 -0
- package/src/cs/entryWalker/lib/resolveBlockTypes.ts +32 -0
- package/src/cs/entryWalker/lib/schemaBlock.ts +25 -0
- package/src/cs/global-fields/delete.ts +21 -0
- package/src/cs/global-fields/export.ts +21 -0
- package/src/cs/global-fields/import.ts +29 -0
- package/src/cs/global-fields/index.ts +33 -0
- package/src/cs/taxonomies/Taxonomy.ts +17 -0
- package/src/cs/taxonomies/TaxonomyDetail.ts +25 -0
- package/src/cs/taxonomies/delete.ts +21 -0
- package/src/cs/taxonomies/export.ts +26 -0
- package/src/cs/taxonomies/import.ts +22 -0
- package/src/cs/taxonomies/index.ts +40 -0
- package/src/cs/taxonomies/update.ts +29 -0
- package/src/cs/terms/Term.ts +16 -0
- package/src/cs/terms/create.ts +37 -0
- package/src/cs/terms/move.ts +44 -0
- package/src/cs/terms/remove.ts +30 -0
- package/src/cs/terms/update.ts +31 -0
- package/src/cs/typecheckArray.ts +31 -0
- package/src/dto/entry/BeaconReplacer.ts +37 -0
- package/src/dto/entry/beaconReplacer/lib/mapItemPathToAsset.ts +20 -0
- package/src/dto/entry/beaconReplacer/lib/process.ts +10 -0
- package/src/dto/entry/beaconReplacer/lib/processAsset.ts +9 -0
- package/src/dto/entry/beaconReplacer/lib/processJsonRteAsset.ts +17 -0
- package/src/dto/entry/beaconReplacer/lib/processObject.ts +10 -0
- package/src/dto/entry/beaconReplacer/lib/processReference.ts +19 -0
- package/src/dto/entry/beaconReplacer/lib/processValue.ts +41 -0
- package/src/dto/entry/beaconReplacer/lib/stripTaxonomies.ts +40 -0
- package/src/dto/entry/fromCs.ts +22 -0
- package/src/dto/entry/lib/AssetReplacer.ts +72 -0
- package/src/dto/entry/lib/BooleanDefaults.ts +23 -0
- package/src/dto/entry/lib/JsonRteReplacer.ts +87 -0
- package/src/dto/entry/lib/MinimalCtx.ts +8 -0
- package/src/dto/entry/lib/ReferenceReplacer.ts +82 -0
- package/src/dto/entry/lib/Replacer.ts +5 -0
- package/src/dto/entry/lib/ReplacerPipeline.ts +33 -0
- package/src/dto/entry/lib/TaxonomyRemover.ts +58 -0
- package/src/dto/entry/lib/TaxonomyValue.ts +14 -0
- package/src/dto/entry/lib/isJsonRteField.ts +30 -0
- package/src/dto/entry/toCs.ts +13 -0
- package/src/dto/schema/fromCs.ts +32 -0
- package/src/dto/schema/lib/replaceBlocks.ts +37 -0
- package/src/dto/schema/lib/replaceField.ts +49 -0
- package/src/dto/schema/lib/replaceGroup.ts +15 -0
- package/src/dto/schema/lib/replaceReference.ts +14 -0
- package/src/dto/schema/lib/traverse.ts +26 -0
- package/src/dto/schema/toCs.ts +59 -0
- package/src/dto/taxonomy/NormalizedTaxonomy.ts +64 -0
- package/src/dto/taxonomy/flatten.ts +27 -0
- package/src/dto/taxonomy/fromCs.ts +29 -0
- package/src/dto/taxonomy/organize.ts +59 -0
- package/src/dto/taxonomy/taxonomyStrategy.ts +18 -0
- package/src/dto/taxonomy/toCs.ts +32 -0
- package/src/fs/assets/Assets.ts +49 -0
- package/src/fs/readYaml.ts +8 -0
- package/src/fs/tryReadDir.test.ts +15 -0
- package/src/fs/tryReadDir.ts +14 -0
- package/src/fs/writeYaml.test.ts +34 -0
- package/src/fs/writeYaml.ts +14 -0
- package/src/schema/SchemaOperationError.ts +19 -0
- package/src/schema/assetFolders/lib/FolderMeta.ts +4 -0
- package/src/schema/assetFolders/lib/indexContentstack.ts +34 -0
- package/src/schema/assetFolders/lib/planPush.test.ts +158 -0
- package/src/schema/assetFolders/lib/planPush.ts +132 -0
- package/src/schema/assetFolders/toContentstack.ts +58 -0
- package/src/schema/assets/AssetMeta.ts +19 -0
- package/src/schema/assets/assets.md +138 -0
- package/src/schema/assets/lib/MetaSerialization.ts +61 -0
- package/src/schema/assets/lib/NamingConvention.test.ts +49 -0
- package/src/schema/assets/lib/NamingConvention.ts +93 -0
- package/src/schema/assets/lib/loadMetaCs.ts +19 -0
- package/src/schema/assets/lib/planPull.test.ts +54 -0
- package/src/schema/assets/lib/planPull.ts +73 -0
- package/src/schema/assets/lib/planPush.test.ts +58 -0
- package/src/schema/assets/lib/planPush.ts +88 -0
- package/src/schema/assets/lib/resolveItemPath.ts +26 -0
- package/src/schema/assets/lib/writeAssetToContentstack.ts +30 -0
- package/src/schema/assets/lib/writeAssetToFileSystem.ts +39 -0
- package/src/schema/assets/schemaDirectory.ts +12 -0
- package/src/schema/assets/toContentstack.ts +65 -0
- package/src/schema/assets/toFilesystem.ts +51 -0
- package/src/schema/clear.ts +114 -0
- package/src/schema/content-types/indexFromFilesystem.ts +11 -0
- package/src/schema/content-types/reduceToShim.ts +32 -0
- package/src/schema/content-types/schemaDirectory.ts +12 -0
- package/src/schema/content-types/shimsToContentstack.ts +42 -0
- package/src/schema/content-types/toContentstack.ts +38 -0
- package/src/schema/content-types/toFilesystem.ts +44 -0
- package/src/schema/ctx/Ctx.ts +134 -0
- package/src/schema/ctx/lib/CsTaxonomyCollection.ts +48 -0
- package/src/schema/ctx/lib/FsTaxonomyCollection.ts +46 -0
- package/src/schema/ctx/lib/TaxonomyCollection.ts +9 -0
- package/src/schema/entries/EntryCollection.ts +86 -0
- package/src/schema/entries/clean.test.ts +23 -0
- package/src/schema/entries/clean.ts +30 -0
- package/src/schema/entries/equality.ts +7 -0
- package/src/schema/entries/indexAllFsEntries.ts +149 -0
- package/src/schema/entries/lib/buildCreator.ts +207 -0
- package/src/schema/entries/lib/generateFilenames.ts +77 -0
- package/src/schema/entries/lib/loadEntryLocales.test.ts +152 -0
- package/src/schema/entries/lib/loadEntryLocales.ts +123 -0
- package/src/schema/entries/lib/normalize.ts +53 -0
- package/src/schema/entries/schemaDirectory.ts +12 -0
- package/src/schema/entries/toContentstack.ts +165 -0
- package/src/schema/entries/toFilesystem.ts +171 -0
- package/src/schema/entries/updateMissedReferences.ts +49 -0
- package/src/schema/global-fields/schemaDirectory.ts +12 -0
- package/src/schema/global-fields/toContentstack.ts +31 -0
- package/src/schema/global-fields/toFilesystem.ts +38 -0
- package/src/schema/isEquivalentSchema.test.ts +24 -0
- package/src/schema/isEquivalentSchema.ts +21 -0
- package/src/schema/lib/PushResults.ts +17 -0
- package/src/schema/lib/SchemaUi.ts +14 -0
- package/src/schema/lib/createProgressBar.ts +9 -0
- package/src/schema/lib/pullModules.ts +53 -0
- package/src/schema/normalize.test.ts +20 -0
- package/src/schema/normalize.ts +69 -0
- package/src/schema/pull.ts +28 -0
- package/src/schema/push.ts +77 -0
- package/src/schema/references/ReferenceMap.ts +98 -0
- package/src/schema/taxonomies/lib/indexCs.ts +72 -0
- package/src/schema/taxonomies/lib/indexFs.ts +13 -0
- package/src/schema/taxonomies/schemaDirectory.ts +12 -0
- package/src/schema/taxonomies/toContentstack.ts +34 -0
- package/src/schema/taxonomies/toFilesystem.ts +42 -0
- package/src/schema/terms/collection/Collection.ts +70 -0
- package/src/schema/terms/collection/lib/MutableTerm.ts +7 -0
- package/src/schema/terms/collection/lib/create.ts +33 -0
- package/src/schema/terms/collection/lib/descendants.ts +14 -0
- package/src/schema/terms/collection/lib/getRequired.ts +11 -0
- package/src/schema/terms/collection/lib/getSiblingContext.ts +24 -0
- package/src/schema/terms/collection/lib/insertTermIntoSiblings.ts +22 -0
- package/src/schema/terms/collection/lib/move.ts +50 -0
- package/src/schema/terms/collection/lib/remove.ts +73 -0
- package/src/schema/terms/collection/lib/update.ts +37 -0
- package/src/schema/terms/lib/ActionType.ts +2 -0
- package/src/schema/terms/lib/TermAction.ts +9 -0
- package/src/schema/terms/lib/deletions.ts +33 -0
- package/src/schema/terms/lib/filterTaxonomies.ts +17 -0
- package/src/schema/terms/lib/mutations.ts +67 -0
- package/src/schema/terms/lib/processActions.ts +35 -0
- package/src/schema/terms/toContentstack.ts +28 -0
- package/src/schema/xfer/Filename.ts +2 -0
- package/src/schema/xfer/TransferResults.ts +64 -0
- package/src/schema/xfer/indexFromFilesystem.ts +47 -0
- package/src/schema/xfer/lib/MergePlan.ts +6 -0
- package/src/schema/xfer/lib/handleCreations.ts +25 -0
- package/src/schema/xfer/lib/handleDeletions.ts +65 -0
- package/src/schema/xfer/lib/handleUnmodified.ts +15 -0
- package/src/schema/xfer/lib/handleUpdates.ts +25 -0
- package/src/schema/xfer/lib/planMerge.ts +31 -0
- package/src/schema/xfer/lib/processPlan.ts +58 -0
- package/src/tsconfig.json +15 -0
- package/src/ui/HandledError.ts +24 -0
- package/src/ui/LogContext.ts +5 -0
- package/src/ui/Options.ts +33 -0
- package/src/ui/PartialOptions.ts +19 -0
- package/src/ui/UiContext.ts +77 -0
- package/src/ui/UiOptions.test.ts +45 -0
- package/src/ui/UiOptions.ts +84 -0
- package/src/ui/command/clear.ts +78 -0
- package/src/ui/command/pull.ts +95 -0
- package/src/ui/command/push.ts +100 -0
- package/src/ui/createStylus.ts +15 -0
- package/src/ui/humanizeList.ts +80 -0
- package/src/ui/humanizePath.ts +15 -0
- package/src/ui/logApiPerformance.ts +118 -0
- package/src/ui/logOptions.ts +37 -0
- package/src/ui/logResults.ts +116 -0
- package/src/ui/option/apiKey.ts +13 -0
- package/src/ui/option/apiTimeout.ts +24 -0
- package/src/ui/option/baseUrl.ts +25 -0
- package/src/ui/option/branch.ts +17 -0
- package/src/ui/option/commonOptions.ts +23 -0
- package/src/ui/option/configFile.ts +19 -0
- package/src/ui/option/deletionStrategy.ts +20 -0
- package/src/ui/option/environment.ts +9 -0
- package/src/ui/option/extension.ts +16 -0
- package/src/ui/option/index.ts +24 -0
- package/src/ui/option/jsonRtePlugin.ts +16 -0
- package/src/ui/option/managementToken.ts +18 -0
- package/src/ui/option/schemaPath.ts +20 -0
- package/src/ui/option/verbose.ts +10 -0
- package/src/ui/parser/mapParser.ts +47 -0
- package/src/ui/parser/noEmptyStringsFor.ts +12 -0
- package/src/ui/progress/Payload.ts +38 -0
- package/src/ui/progress/ProgressBar.ts +6 -0
- package/src/ui/progress/ProgressReporter.ts +40 -0
- package/src/ui/progress/StyledText.ts +4 -0
- package/src/ui/progress/UiProgressBar.ts +35 -0
- package/src/ui/progress/VerboseProgressBar.ts +74 -0
- package/src/ui/progress/createEmitter.ts +24 -0
- package/src/ui/progress/formatAction.ts +20 -0
- package/src/ui/progress/formatCounter.ts +23 -0
- package/src/ui/progress/formatElapsed.ts +20 -0
- package/src/ui/progress/formatName.ts +14 -0
- package/src/ui/progress/formatProgress.ts +67 -0
- package/src/ui/version.ts +24 -0
- package/src/util/OmitIndex.ts +8 -0
- package/src/util/escapeRegex.ts +17 -0
- package/src/util/isRecord.ts +3 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { Entry } from '#cli/cs/entries/Types.js';
|
|
2
|
+
import readYaml from '#cli/fs/readYaml.js';
|
|
3
|
+
import escapeRegex from '#cli/util/escapeRegex.js';
|
|
4
|
+
import { readdir } from 'node:fs/promises';
|
|
5
|
+
import { resolve } from 'node:path';
|
|
6
|
+
|
|
7
|
+
export interface EntryWithLocale {
|
|
8
|
+
readonly entry: Entry;
|
|
9
|
+
readonly locale: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Loads all locale versions of an entry from the filesystem.
|
|
14
|
+
*
|
|
15
|
+
* This function supports both single-locale and multi-locale file patterns:
|
|
16
|
+
* - Single-locale: `baseFilename.yaml` (assigns locale='default' for backward compatibility)
|
|
17
|
+
* - Multi-locale: `baseFilename.{locale}.yaml` (e.g., `Entry Title.en-us.yaml`)
|
|
18
|
+
*
|
|
19
|
+
* @param directory - The directory containing entry files (e.g., 'schema/entries/event')
|
|
20
|
+
* @param entryTitle - The title of the entry (used to create synthetic uid for filesystem entries)
|
|
21
|
+
* @param baseFilename - The base filename without extension (e.g., 'Entry Title')
|
|
22
|
+
* @returns An array of entry objects with their locale codes. Returns empty array if directory doesn't exist.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // For files: Entry.en-us.yaml, Entry.fr.yaml
|
|
26
|
+
* const locales = await loadEntryLocales('./entries/event', 'Entry', 'Entry');
|
|
27
|
+
* // Returns: [
|
|
28
|
+
* // { entry: {...}, locale: 'en-us' },
|
|
29
|
+
* // { entry: {...}, locale: 'fr' }
|
|
30
|
+
* // ]
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // For single file: Entry.yaml
|
|
34
|
+
* const locales = await loadEntryLocales('./entries/event', 'Entry', 'Entry');
|
|
35
|
+
* // Returns: [{ entry: {...}, locale: 'default' }]
|
|
36
|
+
*/
|
|
37
|
+
export default async function loadEntryLocales(
|
|
38
|
+
directory: string,
|
|
39
|
+
entryTitle: Entry['title'],
|
|
40
|
+
baseFilename: string,
|
|
41
|
+
): Promise<readonly EntryWithLocale[]> {
|
|
42
|
+
const results: EntryWithLocale[] = [];
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
const files = await readdir(directory);
|
|
46
|
+
const multiLocalePattern = createMultiLocalePattern(baseFilename);
|
|
47
|
+
const singleLocaleFilename = `${baseFilename}.yaml`;
|
|
48
|
+
|
|
49
|
+
for (const file of files) {
|
|
50
|
+
const localeEntry = await tryLoadLocaleFile(
|
|
51
|
+
file,
|
|
52
|
+
directory,
|
|
53
|
+
entryTitle,
|
|
54
|
+
multiLocalePattern,
|
|
55
|
+
singleLocaleFilename,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
if (localeEntry) {
|
|
59
|
+
results.push(localeEntry);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (isDirectoryNotFoundError(error)) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return results;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function createMultiLocalePattern(baseFilename: string): RegExp {
|
|
73
|
+
return new RegExp(`^${escapeRegex(baseFilename)}\\.([^.]+)\\.yaml$`, 'u');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function tryLoadLocaleFile(
|
|
77
|
+
file: string,
|
|
78
|
+
directory: string,
|
|
79
|
+
entryTitle: string,
|
|
80
|
+
multiLocalePattern: RegExp,
|
|
81
|
+
singleLocaleFilename: string,
|
|
82
|
+
): Promise<EntryWithLocale | null> {
|
|
83
|
+
const match = file.match(multiLocalePattern);
|
|
84
|
+
if (match) {
|
|
85
|
+
const [, locale] = match;
|
|
86
|
+
if (!locale) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const entry = await loadEntryFile(directory, file, entryTitle);
|
|
91
|
+
return { entry, locale };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (file === singleLocaleFilename) {
|
|
95
|
+
const entry = await loadEntryFile(directory, file, entryTitle);
|
|
96
|
+
return { entry, locale: 'default' };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function loadEntryFile(
|
|
103
|
+
directory: string,
|
|
104
|
+
file: string,
|
|
105
|
+
entryTitle: string,
|
|
106
|
+
): Promise<Entry> {
|
|
107
|
+
const filePath = resolve(directory, file);
|
|
108
|
+
const data = (await readYaml(filePath)) as Record<string, unknown>;
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
...data,
|
|
112
|
+
uid: `file: ${entryTitle}`,
|
|
113
|
+
} as Entry;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function isDirectoryNotFoundError(error: unknown): boolean {
|
|
117
|
+
return (
|
|
118
|
+
error !== null &&
|
|
119
|
+
typeof error === 'object' &&
|
|
120
|
+
'code' in error &&
|
|
121
|
+
error.code === 'ENOENT'
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Entry } from '#cli/cs/entries/Types.js';
|
|
2
|
+
import isRecord from '#cli/util/isRecord.js';
|
|
3
|
+
|
|
4
|
+
// There are several fields on entries that we have limited control over,
|
|
5
|
+
// and that are not stable across import/export operations.
|
|
6
|
+
//
|
|
7
|
+
// We wish to avoid considering these fields any time we compare two entries.
|
|
8
|
+
//
|
|
9
|
+
// This is used when determining entry equality.
|
|
10
|
+
//
|
|
11
|
+
// Also, we use this set to remove fields from the serialized versions of
|
|
12
|
+
// entries before saving them to the file system, so we do not clutter git
|
|
13
|
+
// histories with inconsequential changes.
|
|
14
|
+
const topLevelBlacklist: ReadonlySet<string> = new Set<string>([
|
|
15
|
+
'_in_progress', // Don't know what this does, seems to be an internal field.
|
|
16
|
+
'_version', // Versions change with every import/export and are not stable.
|
|
17
|
+
'ACL', // Read/Import/Export APIs return different values for this field.
|
|
18
|
+
'created_at', // Reflects date of last import, not actual creation date.
|
|
19
|
+
'created_by', // Reflects user who ran import, not actual creator.
|
|
20
|
+
'uid', // Mutates if an entry is deleted and re-created.
|
|
21
|
+
'updated_at', // Reflects date of last import, not actual update date.
|
|
22
|
+
'updated_by', // Reflects user who ran import, not actual updater.
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
const subLevelBlacklist: ReadonlySet<string> = new Set<string>(['_metadata']);
|
|
26
|
+
|
|
27
|
+
export default function normalize(entry: Entry) {
|
|
28
|
+
return Object.fromEntries(
|
|
29
|
+
Object.entries(entry).filter(notIn(topLevelBlacklist)).map(normalizeKvP),
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function normalizeKvP([key, value]: [string, unknown]): [string, unknown] {
|
|
34
|
+
return [key, normalizeValue(value)];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function normalizeValue(value: unknown): unknown {
|
|
38
|
+
if (Array.isArray(value)) {
|
|
39
|
+
return value.map(normalizeValue);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (isRecord(value)) {
|
|
43
|
+
return Object.fromEntries(
|
|
44
|
+
Object.entries(value).filter(notIn(subLevelBlacklist)).map(normalizeKvP),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function notIn(list: ReadonlySet<string>) {
|
|
52
|
+
return ([key]: [string, unknown]) => !list.has(key);
|
|
53
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import getUi from '../lib/SchemaUi.js';
|
|
3
|
+
|
|
4
|
+
export default function schemaDirectory(contentTypeUid: string) {
|
|
5
|
+
const {
|
|
6
|
+
options: {
|
|
7
|
+
schema: { schemaPath },
|
|
8
|
+
},
|
|
9
|
+
} = getUi();
|
|
10
|
+
|
|
11
|
+
return resolve(schemaPath, 'entries', contentTypeUid);
|
|
12
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { ContentType } from '#cli/cs/content-types/Types.js';
|
|
2
|
+
import deleteEntry from '#cli/cs/entries/delete.js';
|
|
3
|
+
import getEntryLocales from '#cli/cs/entries/getEntryLocales.js';
|
|
4
|
+
import importEntry from '#cli/cs/entries/import.js';
|
|
5
|
+
import type { Entry } from '#cli/cs/entries/Types.js';
|
|
6
|
+
import BeaconReplacer from '#cli/dto/entry/BeaconReplacer.js';
|
|
7
|
+
import type ProgressBar from '#cli/ui/progress/ProgressBar.js';
|
|
8
|
+
import type Ctx from '../ctx/Ctx.js';
|
|
9
|
+
import getUi from '../lib/SchemaUi.js';
|
|
10
|
+
import planMerge from '../xfer/lib/planMerge.js';
|
|
11
|
+
import processPlan from '../xfer/lib/processPlan.js';
|
|
12
|
+
import equality from './equality.js';
|
|
13
|
+
import buildCreator from './lib/buildCreator.js';
|
|
14
|
+
import generateFilenames from './lib/generateFilenames.js';
|
|
15
|
+
import loadEntryLocales from './lib/loadEntryLocales.js';
|
|
16
|
+
import schemaDirectory from './schemaDirectory.js';
|
|
17
|
+
|
|
18
|
+
export default async function toContentstack(
|
|
19
|
+
ctx: Ctx,
|
|
20
|
+
contentType: ContentType,
|
|
21
|
+
bar: ProgressBar,
|
|
22
|
+
) {
|
|
23
|
+
const ui = getUi();
|
|
24
|
+
|
|
25
|
+
const fsEntriesByTitle = ctx.fs.entries.byTitleFor(contentType.uid);
|
|
26
|
+
const csEntriesByTitle = ctx.cs.entries.byTitleFor(contentType.uid);
|
|
27
|
+
const transformer = new BeaconReplacer(ctx, contentType);
|
|
28
|
+
const filenamesByTitle = generateFilenames(fsEntriesByTitle);
|
|
29
|
+
const create = buildCreator(ctx, transformer, contentType);
|
|
30
|
+
const update = buildUpdateFn(
|
|
31
|
+
ctx,
|
|
32
|
+
csEntriesByTitle,
|
|
33
|
+
transformer,
|
|
34
|
+
contentType,
|
|
35
|
+
filenamesByTitle,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const result = await processPlan<Entry>({
|
|
39
|
+
create,
|
|
40
|
+
deletionStrategy: ui.options.schema.deletionStrategy,
|
|
41
|
+
plan: planMerge(equality, fsEntriesByTitle, csEntriesByTitle),
|
|
42
|
+
progress: bar,
|
|
43
|
+
remove: async (entry) =>
|
|
44
|
+
deleteEntry(ctx.cs.client, contentType.uid, entry.uid),
|
|
45
|
+
update,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
for (const title of result.unmodified) {
|
|
49
|
+
const cs = csEntriesByTitle.get(title);
|
|
50
|
+
const fs = fsEntriesByTitle.get(title);
|
|
51
|
+
|
|
52
|
+
if (cs && !fs && ui.options.schema.deletionStrategy !== 'delete') {
|
|
53
|
+
// The entry was deleted from the file system, but the user has chosen
|
|
54
|
+
// to ignore deletions in Contentstack. The item is invalid as a
|
|
55
|
+
// reference, but does not represent an error state.
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!cs || !fs) {
|
|
60
|
+
throw new Error(`No matching entry found for ${title}.`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const entry = { ...fs, uid: cs.uid };
|
|
64
|
+
ctx.references.recordEntryForReferences(contentType.uid, entry);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function buildUpdateFn(
|
|
71
|
+
ctx: Ctx,
|
|
72
|
+
csEntriesByTitle: ReadonlyMap<string, Entry>,
|
|
73
|
+
transformer: BeaconReplacer,
|
|
74
|
+
contentType: ContentType,
|
|
75
|
+
filenamesByTitle: ReadonlyMap<Entry['uid'], string>,
|
|
76
|
+
) {
|
|
77
|
+
return async (entry: Entry) => {
|
|
78
|
+
const match = csEntriesByTitle.get(entry.title);
|
|
79
|
+
if (!match) {
|
|
80
|
+
throw new Error(`No matching entry found for ${entry.title}.`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const fsLocaleVersions = await loadFsLocaleVersions(
|
|
84
|
+
entry,
|
|
85
|
+
contentType.uid,
|
|
86
|
+
filenamesByTitle,
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
const csLocaleSet = await getExistingLocales(ctx, contentType, match.uid);
|
|
90
|
+
|
|
91
|
+
await updateAllLocales(
|
|
92
|
+
ctx,
|
|
93
|
+
transformer,
|
|
94
|
+
contentType,
|
|
95
|
+
fsLocaleVersions,
|
|
96
|
+
match.uid,
|
|
97
|
+
csLocaleSet,
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
ctx.references.recordEntryForReferences(contentType.uid, {
|
|
101
|
+
...entry,
|
|
102
|
+
uid: match.uid,
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
async function loadFsLocaleVersions(
|
|
108
|
+
entry: Entry,
|
|
109
|
+
contentTypeUid: string,
|
|
110
|
+
filenamesByTitle: ReadonlyMap<Entry['uid'], string>,
|
|
111
|
+
) {
|
|
112
|
+
const filename = filenamesByTitle.get(entry.title);
|
|
113
|
+
if (!filename) {
|
|
114
|
+
throw new Error(`No filename found for entry ${entry.title}.`);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const baseFilename = filename.replace(/\.yaml$/u, '');
|
|
118
|
+
const directory = schemaDirectory(contentTypeUid);
|
|
119
|
+
|
|
120
|
+
return loadEntryLocales(directory, entry.title, baseFilename);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async function getExistingLocales(
|
|
124
|
+
ctx: Ctx,
|
|
125
|
+
contentType: ContentType,
|
|
126
|
+
entryUid: string,
|
|
127
|
+
) {
|
|
128
|
+
const csLocales = await getEntryLocales(
|
|
129
|
+
ctx.cs.client,
|
|
130
|
+
contentType.uid,
|
|
131
|
+
entryUid,
|
|
132
|
+
);
|
|
133
|
+
return new Set(csLocales.map((l) => l.code));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
async function updateAllLocales(
|
|
137
|
+
ctx: Ctx,
|
|
138
|
+
transformer: BeaconReplacer,
|
|
139
|
+
contentType: ContentType,
|
|
140
|
+
fsLocaleVersions: Awaited<ReturnType<typeof loadFsLocaleVersions>>,
|
|
141
|
+
entryUid: string,
|
|
142
|
+
csLocaleSet: Set<string>,
|
|
143
|
+
) {
|
|
144
|
+
// Import all locale versions in parallel for better performance
|
|
145
|
+
const importPromises = fsLocaleVersions.map(async (localeVersion) => {
|
|
146
|
+
const transformed = transformer.process(localeVersion.entry);
|
|
147
|
+
|
|
148
|
+
// Pass undefined for 'default' locale (single-locale backward compat)
|
|
149
|
+
const locale =
|
|
150
|
+
localeVersion.locale === 'default' ? undefined : localeVersion.locale;
|
|
151
|
+
const overwrite = locale
|
|
152
|
+
? csLocaleSet.has(localeVersion.locale)
|
|
153
|
+
: csLocaleSet.size > 0;
|
|
154
|
+
|
|
155
|
+
return importEntry(
|
|
156
|
+
ctx.cs.client,
|
|
157
|
+
contentType.uid,
|
|
158
|
+
{ ...transformed, uid: entryUid },
|
|
159
|
+
overwrite,
|
|
160
|
+
locale,
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
await Promise.all(importPromises);
|
|
165
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { ContentType } from '#cli/cs/content-types/Types.js';
|
|
2
|
+
import exportEntryLocale from '#cli/cs/entries/exportEntryLocale.js';
|
|
3
|
+
import getEntryLocales from '#cli/cs/entries/getEntryLocales.js';
|
|
4
|
+
import type { Entry } from '#cli/cs/entries/Types.js';
|
|
5
|
+
import transformEntry from '#cli/dto/entry/fromCs.js';
|
|
6
|
+
import writeYaml from '#cli/fs/writeYaml.js';
|
|
7
|
+
import getUi from '#cli/schema/lib/SchemaUi.js';
|
|
8
|
+
import escapeRegex from '#cli/util/escapeRegex.js';
|
|
9
|
+
import type ProgressBar from '#cli/ui/progress/ProgressBar.js';
|
|
10
|
+
import { readdir, rm } from 'node:fs/promises';
|
|
11
|
+
import { basename, resolve } from 'node:path';
|
|
12
|
+
import type Ctx from '../ctx/Ctx.js';
|
|
13
|
+
import Filename from '../xfer/Filename.js';
|
|
14
|
+
import planMerge from '../xfer/lib/planMerge.js';
|
|
15
|
+
import processPlan from '../xfer/lib/processPlan.js';
|
|
16
|
+
import equality from './equality.js';
|
|
17
|
+
import generateFilenames from './lib/generateFilenames.js';
|
|
18
|
+
import schemaDirectory from './schemaDirectory.js';
|
|
19
|
+
|
|
20
|
+
export default async function toFilesystem(
|
|
21
|
+
ctx: Ctx,
|
|
22
|
+
contentType: ContentType,
|
|
23
|
+
bar: ProgressBar,
|
|
24
|
+
) {
|
|
25
|
+
const directory = schemaDirectory(contentType.uid);
|
|
26
|
+
const fsEntries = ctx.fs.entries.byTitleFor(contentType.uid);
|
|
27
|
+
const csEntries = ctx.cs.entries.byTitleFor(contentType.uid);
|
|
28
|
+
const filenamesByTitle = generateFilenames(csEntries);
|
|
29
|
+
|
|
30
|
+
const getBasePath = (entry: Entry) =>
|
|
31
|
+
resolve(directory, resolveFilename(filenamesByTitle, entry));
|
|
32
|
+
|
|
33
|
+
const write = createWriteFn(ctx, contentType, directory, getBasePath);
|
|
34
|
+
const remove = createRemoveFn(directory, getBasePath);
|
|
35
|
+
|
|
36
|
+
return processPlan<Entry>({
|
|
37
|
+
create: write,
|
|
38
|
+
deletionStrategy: 'delete',
|
|
39
|
+
plan: planMerge(equality, csEntries, fsEntries),
|
|
40
|
+
progress: bar,
|
|
41
|
+
remove,
|
|
42
|
+
update: write,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function createWriteFn(
|
|
47
|
+
ctx: Ctx,
|
|
48
|
+
contentType: ContentType,
|
|
49
|
+
directory: string,
|
|
50
|
+
getBasePath: (entry: Entry) => string,
|
|
51
|
+
) {
|
|
52
|
+
return async (entry: Entry) => {
|
|
53
|
+
let locales: readonly { code: string }[];
|
|
54
|
+
try {
|
|
55
|
+
locales = await getEntryLocales(
|
|
56
|
+
ctx.cs.client,
|
|
57
|
+
contentType.uid,
|
|
58
|
+
entry.uid,
|
|
59
|
+
);
|
|
60
|
+
} catch {
|
|
61
|
+
// If the locales endpoint fails (e.g., not supported by Contentstack instance),
|
|
62
|
+
// fall back to single-locale behavior using entry's locale property
|
|
63
|
+
if (!entry.locale || typeof entry.locale !== 'string') {
|
|
64
|
+
// Skip entries without a valid locale
|
|
65
|
+
getUi().warn(
|
|
66
|
+
`Warning: Skipping entry "${entry.title}" (${entry.uid}) in ${contentType.uid} - no valid locale information available`,
|
|
67
|
+
);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
locales = [{ code: entry.locale }];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (locales.length === 0) {
|
|
74
|
+
// If no locales available, skip this entry
|
|
75
|
+
getUi().warn(
|
|
76
|
+
`Warning: Skipping entry "${entry.title}" (${entry.uid}) in ${contentType.uid} - no locales returned`,
|
|
77
|
+
);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// If only one locale, save without locale suffix for backward compatibility
|
|
82
|
+
const useLocaleSuffix = locales.length > 1;
|
|
83
|
+
|
|
84
|
+
// Write all locale versions in parallel for better performance
|
|
85
|
+
const writePromises = locales.map(async (locale) =>
|
|
86
|
+
writeLocaleVersion(
|
|
87
|
+
ctx,
|
|
88
|
+
contentType,
|
|
89
|
+
entry,
|
|
90
|
+
locale.code,
|
|
91
|
+
getBasePath,
|
|
92
|
+
useLocaleSuffix,
|
|
93
|
+
),
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
await Promise.all(writePromises);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async function writeLocaleVersion(
|
|
101
|
+
ctx: Ctx,
|
|
102
|
+
contentType: ContentType,
|
|
103
|
+
entry: Entry,
|
|
104
|
+
localeCode: string,
|
|
105
|
+
getBasePath: (entry: Entry) => string,
|
|
106
|
+
useLocaleSuffix: boolean,
|
|
107
|
+
) {
|
|
108
|
+
const exported = await exportEntryLocale(
|
|
109
|
+
contentType.uid,
|
|
110
|
+
ctx.cs.client,
|
|
111
|
+
entry.uid,
|
|
112
|
+
localeCode,
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const { uid, ...transformed } = transformEntry(ctx, contentType, exported);
|
|
116
|
+
|
|
117
|
+
const basePath = getBasePath(entry);
|
|
118
|
+
const filePath = useLocaleSuffix
|
|
119
|
+
? basePath.replace(/\.yaml$/u, `.${localeCode}.yaml`)
|
|
120
|
+
: basePath;
|
|
121
|
+
await writeYaml(filePath, transformed);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function createRemoveFn(
|
|
125
|
+
directory: string,
|
|
126
|
+
getBasePath: (entry: Entry) => string,
|
|
127
|
+
) {
|
|
128
|
+
return async (entry: Entry) => {
|
|
129
|
+
const basePath = getBasePath(entry);
|
|
130
|
+
const baseFilename = basename(basePath, '.yaml');
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
const files = await readdir(directory);
|
|
134
|
+
const pattern = new RegExp(
|
|
135
|
+
`^${escapeRegex(baseFilename)}\\..*\\.yaml$`,
|
|
136
|
+
'u',
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
for (const file of files) {
|
|
140
|
+
// Remove both locale-suffixed files (entry.en-us.yaml) and base file (entry.yaml)
|
|
141
|
+
if (pattern.test(file) || file === `${baseFilename}.yaml`) {
|
|
142
|
+
await rm(resolve(directory, file), { force: true });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
} catch {
|
|
146
|
+
// Directory might not exist, which is fine
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function resolveFilename(
|
|
152
|
+
filenamesByTitle: ReadonlyMap<Entry['title'], string>,
|
|
153
|
+
entry: Entry,
|
|
154
|
+
) {
|
|
155
|
+
if (Filename in entry) {
|
|
156
|
+
const embedded = entry[Filename];
|
|
157
|
+
if (typeof embedded === 'string') {
|
|
158
|
+
return embedded;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
throw new Error(`Invalid embedded filename for entry ${entry.uid}`);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const generated = filenamesByTitle.get(entry.title);
|
|
165
|
+
if (!generated) {
|
|
166
|
+
const msg = `No filename found for entry [${entry.uid}]: ${entry.title}`;
|
|
167
|
+
throw new Error(msg);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return generated;
|
|
171
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import importEntry from '#cli/cs/entries/import.js';
|
|
2
|
+
import type { ReferencePath } from '#cli/cs/entries/Types.js';
|
|
3
|
+
import transformEntry from '#cli/dto/entry/toCs.js';
|
|
4
|
+
import ProgressReporter from '#cli/ui/progress/ProgressReporter.js';
|
|
5
|
+
import type Ctx from '../ctx/Ctx.js';
|
|
6
|
+
import getUi from '../lib/SchemaUi.js';
|
|
7
|
+
import type TransferResults from '../xfer/TransferResults.js';
|
|
8
|
+
import { MutableTransferResults } from '../xfer/TransferResults.js';
|
|
9
|
+
|
|
10
|
+
export default async function updateMissedReferences(
|
|
11
|
+
ctx: Ctx,
|
|
12
|
+
): Promise<TransferResults> {
|
|
13
|
+
const { references } = ctx;
|
|
14
|
+
const { missed } = references;
|
|
15
|
+
const results = new MutableTransferResults();
|
|
16
|
+
|
|
17
|
+
if (missed === 0) {
|
|
18
|
+
return results;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
using bar = getUi().createProgressBar('References', missed);
|
|
22
|
+
const minimalCtx = { cs: ctx.cs, references: references.seal() };
|
|
23
|
+
|
|
24
|
+
for (const [
|
|
25
|
+
contentTypeUid,
|
|
26
|
+
entry,
|
|
27
|
+
] of references.entriesWithMissedReferences()) {
|
|
28
|
+
const contentType = ctx.fs.contentTypes.get(contentTypeUid);
|
|
29
|
+
if (!contentType) {
|
|
30
|
+
throw new Error(`Content type not found: ${contentTypeUid}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const refPath: ReferencePath = `${contentType.uid}/${entry.title}`;
|
|
34
|
+
using reporter = new ProgressReporter(bar, 'updating', refPath);
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const transformed = transformEntry(minimalCtx, contentType, entry);
|
|
38
|
+
await importEntry(ctx.cs.client, contentTypeUid, transformed, true);
|
|
39
|
+
results.updated.add(refPath);
|
|
40
|
+
} catch (ex: unknown) {
|
|
41
|
+
results.errored.set(refPath, ex);
|
|
42
|
+
} finally {
|
|
43
|
+
bar.increment();
|
|
44
|
+
reporter.finish('updated');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return results;
|
|
49
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import deleteGlobalField from '#cli/cs/global-fields/delete.js';
|
|
2
|
+
import importGlobalField from '#cli/cs/global-fields/import.js';
|
|
3
|
+
import type { Schema } from '#cli/cs/Types.js';
|
|
4
|
+
import { isSchema, itemKey } from '#cli/cs/Types.js';
|
|
5
|
+
import transform from '#cli/dto/schema/toCs.js';
|
|
6
|
+
import type Ctx from '../ctx/Ctx.js';
|
|
7
|
+
import equality from '../isEquivalentSchema.js';
|
|
8
|
+
import createProgressBar from '../lib/createProgressBar.js';
|
|
9
|
+
import getUi from '../lib/SchemaUi.js';
|
|
10
|
+
import indexFromFilesystem from '../xfer/indexFromFilesystem.js';
|
|
11
|
+
import planMerge from '../xfer/lib/planMerge.js';
|
|
12
|
+
import processPlan from '../xfer/lib/processPlan.js';
|
|
13
|
+
import schemaDirectory from './schemaDirectory.js';
|
|
14
|
+
|
|
15
|
+
export default async function toContentstack(ctx: Ctx) {
|
|
16
|
+
const ui = getUi();
|
|
17
|
+
const directory = schemaDirectory();
|
|
18
|
+
const fsFields = await indexFromFilesystem(directory, isSchema, itemKey);
|
|
19
|
+
using bar = createProgressBar('Global Fields', ctx.cs.globalFields, fsFields);
|
|
20
|
+
|
|
21
|
+
return await processPlan<Schema>({
|
|
22
|
+
create: async (schema) =>
|
|
23
|
+
importGlobalField(ctx.cs.client, false, transform(schema)),
|
|
24
|
+
deletionStrategy: ui.options.schema.deletionStrategy,
|
|
25
|
+
plan: planMerge(equality, fsFields, ctx.cs.globalFields),
|
|
26
|
+
progress: bar,
|
|
27
|
+
remove: async (schema) => deleteGlobalField(ctx.cs.client, schema.uid),
|
|
28
|
+
update: async (schema) =>
|
|
29
|
+
importGlobalField(ctx.cs.client, true, transform(schema)),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import exportGlobalField from '#cli/cs/global-fields/export.js';
|
|
2
|
+
import type { Schema } from '#cli/cs/Types.js';
|
|
3
|
+
import { isSchema, itemKey } from '#cli/cs/Types.js';
|
|
4
|
+
import writeYaml from '#cli/fs/writeYaml.js';
|
|
5
|
+
import { rm } from 'node:fs/promises';
|
|
6
|
+
import { resolve } from 'node:path';
|
|
7
|
+
import fromCs from '../../dto/schema/fromCs.js';
|
|
8
|
+
import type Ctx from '../ctx/Ctx.js';
|
|
9
|
+
import isEquivalentSchema from '../isEquivalentSchema.js';
|
|
10
|
+
import createProgressBar from '../lib/createProgressBar.js';
|
|
11
|
+
import indexFromFilesystem from '../xfer/indexFromFilesystem.js';
|
|
12
|
+
import planMerge from '../xfer/lib/planMerge.js';
|
|
13
|
+
import processPlan from '../xfer/lib/processPlan.js';
|
|
14
|
+
import schemaDirectory from './schemaDirectory.js';
|
|
15
|
+
|
|
16
|
+
export default async function toFilesystem(ctx: Ctx) {
|
|
17
|
+
const directory = schemaDirectory();
|
|
18
|
+
const getPath = (uid: string) => resolve(directory, `${uid}.yaml`);
|
|
19
|
+
|
|
20
|
+
const write = async (schema: Schema) => {
|
|
21
|
+
const exported = await exportGlobalField(ctx.cs.client, schema.uid);
|
|
22
|
+
const transformed = fromCs(exported);
|
|
23
|
+
await writeYaml(getPath(schema.uid), transformed);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const fs = await indexFromFilesystem(directory, isSchema, itemKey);
|
|
27
|
+
|
|
28
|
+
using bar = createProgressBar('Global Fields', fs, ctx.cs.globalFields);
|
|
29
|
+
|
|
30
|
+
return await processPlan<Schema>({
|
|
31
|
+
create: write,
|
|
32
|
+
deletionStrategy: 'delete',
|
|
33
|
+
plan: planMerge(isEquivalentSchema, ctx.cs.globalFields, fs),
|
|
34
|
+
progress: bar,
|
|
35
|
+
remove: async (schema) => rm(getPath(schema.uid), { force: true }),
|
|
36
|
+
update: write,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Schema } from '#cli/cs/Types.js';
|
|
2
|
+
import readFixture from '#test/fixtures/readFixture';
|
|
3
|
+
import { expect, test } from 'vitest';
|
|
4
|
+
import { parse } from 'yaml';
|
|
5
|
+
import isEquivalentSchema from './isEquivalentSchema.js';
|
|
6
|
+
|
|
7
|
+
test('Equal schemas are equal', () => {
|
|
8
|
+
const simpleSchema = { schema: [], title: 'title', uid: 'uid' };
|
|
9
|
+
expect(isEquivalentSchema(simpleSchema, simpleSchema)).toBe(true);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
['navigation'].forEach((fixtureName) =>
|
|
13
|
+
test(`Fixtures are equivalent: ${fixtureName}`, async () => {
|
|
14
|
+
const [x, y] = await Promise.all([
|
|
15
|
+
readFixture(`${fixtureName}-read.yaml`),
|
|
16
|
+
readFixture(`${fixtureName}-export.yaml`),
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
const read = parse(x) as Schema;
|
|
20
|
+
const exportFixture = parse(y) as Schema;
|
|
21
|
+
|
|
22
|
+
expect(isEquivalentSchema(read, exportFixture)).toBe(true);
|
|
23
|
+
}),
|
|
24
|
+
);
|