@techdocs/cli 1.12.0 → 1.12.1-next.0
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/CHANGELOG.md +11 -0
- package/dist/commands/generate/generate.cjs.js.map +1 -1
- package/dist/commands/index.cjs.js.map +1 -1
- package/dist/commands/migrate/migrate.cjs.js.map +1 -1
- package/dist/commands/publish/publish.cjs.js.map +1 -1
- package/dist/commands/serve/mkdocs.cjs.js.map +1 -1
- package/dist/commands/serve/serve.cjs.js.map +1 -1
- package/dist/commands/serve/utils.cjs.js.map +1 -1
- package/dist/embedded-app/.config-schema.json +48 -47
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/123.bc6a54ead4a3.chunk.js +2 -0
- package/dist/embedded-app/static/123.bc6a54ead4a3.chunk.js.map +1 -0
- package/dist/embedded-app/static/1659.9fe64c5d9180.chunk.js +2 -0
- package/dist/embedded-app/static/1659.9fe64c5d9180.chunk.js.map +1 -0
- package/dist/embedded-app/static/1749.99ba95728e00.chunk.js.map +1 -1
- package/dist/embedded-app/static/1767.511a3dc76c96.chunk.js +2 -0
- package/dist/embedded-app/static/1767.511a3dc76c96.chunk.js.map +1 -0
- package/dist/embedded-app/static/1994.7736057c2e9f.chunk.js.map +1 -1
- package/dist/embedded-app/static/{2063.c6396ce3e9c9.chunk.js → 2063.be81f1843585.chunk.js} +3 -3
- package/dist/embedded-app/static/2063.be81f1843585.chunk.js.map +1 -0
- package/dist/embedded-app/static/3031.f2ee3495211a.chunk.js +2 -0
- package/dist/embedded-app/static/{3031.cd0a0f1ddfd2.chunk.js.map → 3031.f2ee3495211a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3554.78dd0c182f6c.chunk.js.map +1 -1
- package/dist/embedded-app/static/4587.f762d58ffd52.chunk.js +2 -0
- package/dist/embedded-app/static/4587.f762d58ffd52.chunk.js.map +1 -0
- package/dist/embedded-app/static/{4609.b1c67dc7cac2.chunk.js → 4609.9d9e4473afcc.chunk.js} +6 -6
- package/dist/embedded-app/static/4609.9d9e4473afcc.chunk.js.map +1 -0
- package/dist/embedded-app/static/4648.cd5b8df48435.chunk.js.map +1 -1
- package/dist/embedded-app/static/4876.fa3ad2676113.chunk.js +2 -0
- package/dist/embedded-app/static/4876.fa3ad2676113.chunk.js.map +1 -0
- package/dist/embedded-app/static/5877.73f1d4863c15.chunk.js +2 -0
- package/dist/embedded-app/static/5877.73f1d4863c15.chunk.js.map +1 -0
- package/dist/embedded-app/static/6138.f15d6245c80d.chunk.js.map +1 -1
- package/dist/embedded-app/static/6206.3e7f13e11c59.chunk.js.map +1 -1
- package/dist/embedded-app/static/6949.beeb90ede97f.chunk.js.map +1 -1
- package/dist/embedded-app/static/7203.8b3d94b34b16.chunk.js.map +1 -1
- package/dist/embedded-app/static/9050.bd63e0a33f06.chunk.js.map +1 -1
- package/dist/embedded-app/static/9230.422824f655e0.chunk.js.map +1 -1
- package/dist/embedded-app/static/main.2b07c1548609.js +2 -0
- package/dist/embedded-app/static/main.2b07c1548609.js.map +1 -0
- package/dist/embedded-app/static/module-zod.da562d5b5226.js +56 -0
- package/dist/embedded-app/static/module-zod.da562d5b5226.js.map +1 -0
- package/dist/embedded-app/static/{runtime.720cb48cd7ae.js → runtime.f472dc4c479f.js} +2 -2
- package/dist/embedded-app/static/{runtime.720cb48cd7ae.js.map → runtime.f472dc4c479f.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.470d3e8ecef1.js → vendor.d2c73d5e1e09.js} +2 -2
- package/dist/embedded-app/static/{vendor.470d3e8ecef1.js.map → vendor.d2c73d5e1e09.js.map} +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/lib/PublisherConfig.cjs.js.map +1 -1
- package/dist/lib/etag.cjs.js.map +1 -1
- package/dist/lib/httpServer.cjs.js.map +1 -1
- package/dist/lib/livereload.cjs.js.map +1 -1
- package/dist/lib/mkdocsServer.cjs.js.map +1 -1
- package/dist/lib/utility.cjs.js.map +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/dist/package.json.cjs.js.map +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/123.91ba1b809deb.chunk.js +0 -2
- package/dist/embedded-app/static/123.91ba1b809deb.chunk.js.map +0 -1
- package/dist/embedded-app/static/1659.a99e4eb674e0.chunk.js +0 -2
- package/dist/embedded-app/static/1659.a99e4eb674e0.chunk.js.map +0 -1
- package/dist/embedded-app/static/1767.5aca18e1057b.chunk.js +0 -2
- package/dist/embedded-app/static/1767.5aca18e1057b.chunk.js.map +0 -1
- package/dist/embedded-app/static/2063.c6396ce3e9c9.chunk.js.map +0 -1
- package/dist/embedded-app/static/3031.cd0a0f1ddfd2.chunk.js +0 -2
- package/dist/embedded-app/static/4587.d1220800a7d6.chunk.js +0 -2
- package/dist/embedded-app/static/4587.d1220800a7d6.chunk.js.map +0 -1
- package/dist/embedded-app/static/4609.b1c67dc7cac2.chunk.js.map +0 -1
- package/dist/embedded-app/static/4876.67117dbbe8d1.chunk.js +0 -2
- package/dist/embedded-app/static/4876.67117dbbe8d1.chunk.js.map +0 -1
- package/dist/embedded-app/static/5877.8ad98e3207c5.chunk.js +0 -2
- package/dist/embedded-app/static/5877.8ad98e3207c5.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.9b48363c4ffa.js +0 -2
- package/dist/embedded-app/static/main.9b48363c4ffa.js.map +0 -1
- package/dist/embedded-app/static/module-zod.faf74f910029.js +0 -38
- package/dist/embedded-app/static/module-zod.faf74f910029.js.map +0 -1
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { program } from 'commander';\nimport { registerCommands } from './commands';\nimport { version } from '../package.json';\n\nconst main = (argv: string[]) => {\n program.name('techdocs-cli').version(version);\n\n registerCommands(program);\n\n program.parse(argv);\n};\n\nmain(process.argv);\n"],"names":["program","version","registerCommands"],"mappings":";;;;;;AAoBA,MAAM,IAAA,GAAO,CAAC,IAAA,KAAmB;AAC/B,EAAAA,iBAAA,CAAQ,IAAA,CAAK,cAAc,CAAA,CAAE,OAAA,CAAQC,gBAAO,CAAA;AAE5C,EAAAC,sBAAA,CAAiBF,iBAAO,CAAA;AAExB,EAAAA,iBAAA,CAAQ,MAAM,IAAI,CAAA;AACpB,CAAA;AAEA,IAAA,CAAK,QAAQ,IAAI,CAAA
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { program } from 'commander';\nimport { registerCommands } from './commands';\nimport { version } from '../package.json';\n\nconst main = (argv: string[]) => {\n program.name('techdocs-cli').version(version);\n\n registerCommands(program);\n\n program.parse(argv);\n};\n\nmain(process.argv);\n"],"names":["program","version","registerCommands"],"mappings":";;;;;;AAoBA,MAAM,IAAA,GAAO,CAAC,IAAA,KAAmB;AAC/B,EAAAA,iBAAA,CAAQ,IAAA,CAAK,cAAc,CAAA,CAAE,OAAA,CAAQC,gBAAO,CAAA;AAE5C,EAAAC,sBAAA,CAAiBF,iBAAO,CAAA;AAExB,EAAAA,iBAAA,CAAQ,MAAM,IAAI,CAAA;AACpB,CAAA;AAEA,IAAA,CAAK,QAAQ,IAAI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublisherConfig.cjs.js","sources":["../../src/lib/PublisherConfig.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ConfigReader } from '@backstage/config';\nimport { OptionValues } from 'commander';\n\ntype Publisher = keyof (typeof PublisherConfig)['configFactories'];\ntype PublisherConfiguration = {\n [p in Publisher]?: any;\n} & {\n type: Publisher;\n};\n\n/**\n * Helper when working with publisher-related configurations.\n */\nexport class PublisherConfig {\n /**\n * Maps publisher-specific config keys to config getters.\n */\n private static configFactories = {\n awsS3: PublisherConfig.getValidAwsS3Config,\n azureBlobStorage: PublisherConfig.getValidAzureConfig,\n googleGcs: PublisherConfig.getValidGoogleGcsConfig,\n openStackSwift: PublisherConfig.getValidOpenStackSwiftConfig,\n };\n\n /**\n * Returns Backstage config suitable for use when instantiating a Publisher. If\n * there are any missing or invalid options provided, an error is thrown.\n *\n * Note: This assumes that proper credentials are set in Environment\n * variables for the respective GCS/AWS clients to work.\n */\n static getValidConfig(opts: OptionValues): ConfigReader {\n const publisherType = opts.publisherType;\n\n if (!PublisherConfig.isKnownPublisher(publisherType)) {\n throw new Error(`Unknown publisher type ${opts.publisherType}`);\n }\n\n return new ConfigReader({\n // This backend config is not used at all. Just something needed a create a mock discovery instance.\n backend: {\n baseUrl: 'http://localhost:7007',\n listen: {\n port: 7007,\n },\n },\n techdocs: {\n publisher: PublisherConfig.configFactories[publisherType](opts),\n legacyUseCaseSensitiveTripletPaths:\n opts.legacyUseCaseSensitiveTripletPaths,\n },\n });\n }\n\n /**\n * Typeguard to ensure the publisher has a known config getter.\n */\n private static isKnownPublisher(\n type: string,\n ): type is keyof (typeof PublisherConfig)['configFactories'] {\n return PublisherConfig.configFactories.hasOwnProperty(type);\n }\n\n /**\n * Retrieve valid AWS S3 configuration based on the command.\n */\n private static getValidAwsS3Config(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'awsS3',\n awsS3: {\n bucketName: opts.storageName,\n ...(opts.awsBucketRootPath && {\n bucketRootPath: opts.awsBucketRootPath,\n }),\n ...(opts.awsRoleArn && { credentials: { roleArn: opts.awsRoleArn } }),\n ...(opts.awsEndpoint && { endpoint: opts.awsEndpoint }),\n ...(opts.awsS3ForcePathStyle && { s3ForcePathStyle: true }),\n ...(opts.awsS3sse && { sse: opts.awsS3sse }),\n ...(opts.awsProxy && { httpsProxy: opts.awsProxy }),\n ...(opts.awsMaxAttempts && {\n maxAttempts: Number(opts.awsMaxAttempts),\n }),\n },\n };\n }\n\n /**\n * Retrieve valid Azure Blob Storage configuration based on the command.\n */\n private static getValidAzureConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n if (!opts.azureAccountName) {\n throw new Error(\n `azureBlobStorage requires --azureAccountName to be specified`,\n );\n }\n\n return {\n type: 'azureBlobStorage',\n azureBlobStorage: {\n containerName: opts.storageName,\n credentials: {\n accountName: opts.azureAccountName,\n accountKey: opts.azureAccountKey,\n },\n },\n };\n }\n\n /**\n * Retrieve valid GCS configuration based on the command.\n */\n private static getValidGoogleGcsConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'googleGcs',\n googleGcs: {\n bucketName: opts.storageName,\n ...(opts.gcsBucketRootPath && {\n bucketRootPath: opts.gcsBucketRootPath,\n }),\n },\n };\n }\n\n /**\n * Retrieves valid OpenStack Swift configuration based on the command.\n */\n private static getValidOpenStackSwiftConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n const missingParams = [\n 'osCredentialId',\n 'osSecret',\n 'osAuthUrl',\n 'osSwiftUrl',\n ].filter((param: string) => !opts[param]);\n\n if (missingParams.length) {\n throw new Error(\n `openStackSwift requires the following params to be specified: ${missingParams.join(\n ', ',\n )}`,\n );\n }\n\n return {\n type: 'openStackSwift',\n openStackSwift: {\n containerName: opts.storageName,\n credentials: {\n id: opts.osCredentialId,\n secret: opts.osSecret,\n },\n authUrl: opts.osAuthUrl,\n swiftUrl: opts.osSwiftUrl,\n },\n };\n }\n}\n"],"names":["ConfigReader"],"mappings":";;;;AA6BO,MAAM,eAAA,CAAgB;AAAA;AAAA;AAAA;AAAA,EAI3B,OAAe,eAAA,GAAkB;AAAA,IAC/B,OAAO,eAAA,CAAgB,mBAAA;AAAA,IACvB,kBAAkB,eAAA,CAAgB,mBAAA;AAAA,IAClC,WAAW,eAAA,CAAgB,uBAAA;AAAA,IAC3B,gBAAgB,eAAA,CAAgB;AAAA,GAClC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,OAAO,eAAe,IAAA,EAAkC;AACtD,IAAA,MAAM,gBAAgB,IAAA,CAAK,aAAA;AAE3B,IAAA,IAAI,CAAC,eAAA,CAAgB,gBAAA,CAAiB,aAAa,CAAA,EAAG;AACpD,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,uBAAA,EAA0B,IAAA,CAAK,aAAa,CAAA,CAAE,CAAA;AAAA,IAChE;AAEA,IAAA,OAAO,IAAIA,mBAAA,CAAa;AAAA;AAAA,MAEtB,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,uBAAA;AAAA,QACT,MAAA,EAAQ;AAAA,UACN,IAAA,EAAM;AAAA;AACR,OACF;AAAA,MACA,QAAA,EAAU;AAAA,QACR,SAAA,EAAW,eAAA,CAAgB,eAAA,CAAgB,aAAa,EAAE,IAAI,CAAA;AAAA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,IAAA,CAAK,WAAA;AAAA,QACpB,WAAA,EAAa;AAAA,UACX,aAAa,IAAA,CAAK,gBAAA;AAAA,UAClB,YAAY,IAAA,CAAK;AAAA;AACnB;AACF,KACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,OAAe,wBACb,IAAA,EACwB;AACxB,IAAA,OAAO;AAAA,MACL,IAAA,EAAM,WAAA;AAAA,MACN,SAAA,EAAW;AAAA,QACT,YAAY,IAAA,CAAK,WAAA;AAAA,QACjB,GAAI,KAAK,iBAAA,IAAqB;AAAA,UAC5B,gBAAgB,IAAA,CAAK;AAAA;AACvB;AACF,KACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,OAAe,6BACb,IAAA,EACwB;AACxB,IAAA,MAAM,aAAA,GAAgB;AAAA,MACpB,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA;AAAA,MACA,MAAA,CAAO,CAAC,UAAkB,CAAC,IAAA,CAAK,KAAK,CAAC,CAAA;AAExC,IAAA,IAAI,cAAc,MAAA,EAAQ;AACxB,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,iEAAiE,aAAA,CAAc,IAAA;AAAA,UAC7E;AAAA,SACD,CAAA;AAAA,OACH;AAAA,IACF;AAEA,IAAA,OAAO;AAAA,MACL,IAAA,EAAM,gBAAA;AAAA,MACN,cAAA,EAAgB;AAAA,QACd,eAAe,IAAA,CAAK,WAAA;AAAA,QACpB,WAAA,EAAa;AAAA,UACX,IAAI,IAAA,CAAK,cAAA;AAAA,UACT,QAAQ,IAAA,CAAK;AAAA,SACf;AAAA,QACA,SAAS,IAAA,CAAK,SAAA;AAAA,QACd,UAAU,IAAA,CAAK;AAAA;AACjB,KACF;AAAA,EACF;AACF
|
|
1
|
+
{"version":3,"file":"PublisherConfig.cjs.js","sources":["../../src/lib/PublisherConfig.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ConfigReader } from '@backstage/config';\nimport { OptionValues } from 'commander';\n\ntype Publisher = keyof (typeof PublisherConfig)['configFactories'];\ntype PublisherConfiguration = {\n [p in Publisher]?: any;\n} & {\n type: Publisher;\n};\n\n/**\n * Helper when working with publisher-related configurations.\n */\nexport class PublisherConfig {\n /**\n * Maps publisher-specific config keys to config getters.\n */\n private static configFactories = {\n awsS3: PublisherConfig.getValidAwsS3Config,\n azureBlobStorage: PublisherConfig.getValidAzureConfig,\n googleGcs: PublisherConfig.getValidGoogleGcsConfig,\n openStackSwift: PublisherConfig.getValidOpenStackSwiftConfig,\n };\n\n /**\n * Returns Backstage config suitable for use when instantiating a Publisher. If\n * there are any missing or invalid options provided, an error is thrown.\n *\n * Note: This assumes that proper credentials are set in Environment\n * variables for the respective GCS/AWS clients to work.\n */\n static getValidConfig(opts: OptionValues): ConfigReader {\n const publisherType = opts.publisherType;\n\n if (!PublisherConfig.isKnownPublisher(publisherType)) {\n throw new Error(`Unknown publisher type ${opts.publisherType}`);\n }\n\n return new ConfigReader({\n // This backend config is not used at all. Just something needed a create a mock discovery instance.\n backend: {\n baseUrl: 'http://localhost:7007',\n listen: {\n port: 7007,\n },\n },\n techdocs: {\n publisher: PublisherConfig.configFactories[publisherType](opts),\n legacyUseCaseSensitiveTripletPaths:\n opts.legacyUseCaseSensitiveTripletPaths,\n },\n });\n }\n\n /**\n * Typeguard to ensure the publisher has a known config getter.\n */\n private static isKnownPublisher(\n type: string,\n ): type is keyof (typeof PublisherConfig)['configFactories'] {\n return PublisherConfig.configFactories.hasOwnProperty(type);\n }\n\n /**\n * Retrieve valid AWS S3 configuration based on the command.\n */\n private static getValidAwsS3Config(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'awsS3',\n awsS3: {\n bucketName: opts.storageName,\n ...(opts.awsBucketRootPath && {\n bucketRootPath: opts.awsBucketRootPath,\n }),\n ...(opts.awsRoleArn && { credentials: { roleArn: opts.awsRoleArn } }),\n ...(opts.awsEndpoint && { endpoint: opts.awsEndpoint }),\n ...(opts.awsS3ForcePathStyle && { s3ForcePathStyle: true }),\n ...(opts.awsS3sse && { sse: opts.awsS3sse }),\n ...(opts.awsProxy && { httpsProxy: opts.awsProxy }),\n ...(opts.awsMaxAttempts && {\n maxAttempts: Number(opts.awsMaxAttempts),\n }),\n },\n };\n }\n\n /**\n * Retrieve valid Azure Blob Storage configuration based on the command.\n */\n private static getValidAzureConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n if (!opts.azureAccountName) {\n throw new Error(\n `azureBlobStorage requires --azureAccountName to be specified`,\n );\n }\n\n return {\n type: 'azureBlobStorage',\n azureBlobStorage: {\n containerName: opts.storageName,\n credentials: {\n accountName: opts.azureAccountName,\n accountKey: opts.azureAccountKey,\n },\n },\n };\n }\n\n /**\n * Retrieve valid GCS configuration based on the command.\n */\n private static getValidGoogleGcsConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'googleGcs',\n googleGcs: {\n bucketName: opts.storageName,\n ...(opts.gcsBucketRootPath && {\n bucketRootPath: opts.gcsBucketRootPath,\n }),\n },\n };\n }\n\n /**\n * Retrieves valid OpenStack Swift configuration based on the command.\n */\n private static getValidOpenStackSwiftConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n const missingParams = [\n 'osCredentialId',\n 'osSecret',\n 'osAuthUrl',\n 'osSwiftUrl',\n ].filter((param: string) => !opts[param]);\n\n if (missingParams.length) {\n throw new Error(\n `openStackSwift requires the following params to be specified: ${missingParams.join(\n ', ',\n )}`,\n );\n }\n\n return {\n type: 'openStackSwift',\n openStackSwift: {\n containerName: opts.storageName,\n credent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AAA;AAAA,QACjB,GAAI,KAAK,iBAAA,IAAqB;AAAA,UAC5B,gBAAgB,IAAA,CAAK;AAAA;AACvB;AACF,KACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,OAAe,6BACb,IAAA,EACwB;AACxB,IAAA,MAAM,aAAA,GAAgB;AAAA,MACpB,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA;AAAA,MACA,MAAA,CAAO,CAAC,UAAkB,CAAC,IAAA,CAAK,KAAK,CAAC,CAAA;AAExC,IAAA,IAAI,cAAc,MAAA,EAAQ;AACxB,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,iEAAiE,aAAA,CAAc,IAAA;AAAA,UAC7E;AAAA,SACD,CAAA;AAAA,OACH;AAAA,IACF;AAEA,IAAA,OAAO;AAAA,MACL,IAAA,EAAM,gBAAA;AAAA,MACN,cAAA,EAAgB;AAAA,QACd,eAAe,IAAA,CAAK,WAAA;AAAA,QACpB,WAAA,EAAa;AAAA,UACX,IAAI,IAAA,CAAK,cAAA;AAAA,UACT,QAAQ,IAAA,CAAK;AAAA,SACf;AAAA,QACA,SAAS,IAAA,CAAK,SAAA;AAAA,QACd,UAAU,IAAA,CAAK;AAAA;AACjB,KACF;AAAA,EACF;AACF;;"}
|
package/dist/lib/etag.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"etag.cjs.js","sources":["../../src/lib/etag.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createHash } from 'node:crypto';\nimport { readFile, readdir } from 'node:fs/promises';\nimport { join, posix, relative, sep } from 'node:path';\n\ntype ComputeDirectoryEtagOptions = {\n exclude?: string[];\n};\n\nfunction toPosixPath(filePath: string): string {\n return filePath.split(sep).join(posix.sep);\n}\n\n/**\n * Recursively list all files under a directory, returning paths relative to it.\n */\nasync function listFiles(dir: string, base: string): Promise<string[]> {\n const entries = await readdir(dir, { withFileTypes: true });\n const files: string[] = [];\n\n for (const entry of entries) {\n const fullPath = join(dir, entry.name);\n if (entry.isDirectory()) {\n files.push(...(await listFiles(fullPath, base)));\n } else if (entry.isFile()) {\n files.push(toPosixPath(relative(base, fullPath)));\n }\n }\n\n return files;\n}\n\n/**\n * Compute a deterministic sha256 etag for a directory by hashing all file\n * contents. Files are sorted by their relative path so the result is stable\n * regardless of filesystem enumeration order.\n *\n * This mirrors the approach used in CI pipelines:\n * find . -type f | sort | xargs sha256sum | sha256sum\n */\nexport async function computeDirectoryEtag(\n directory: string,\n options: ComputeDirectoryEtagOptions = {},\n): Promise<string> {\n const excludedFiles = new Set(options.exclude ?? []);\n const files = (await listFiles(directory, directory)).filter(\n file => !excludedFiles.has(file),\n );\n files.sort();\n\n const combinedHash = createHash('sha256');\n\n for (const file of files) {\n const content = await readFile(join(directory, file));\n const fileHash = createHash('sha256').update(content).digest('hex');\n combinedHash.update(`${fileHash} ${file}\\n`);\n }\n\n return combinedHash.digest('hex');\n}\n"],"names":["sep","posix","readdir","join","relative","createHash","readFile"],"mappings":";;;;;;AAwBA,SAAS,YAAY,QAAA,EAA0B;AAC7C,EAAA,OAAO,SAAS,KAAA,CAAMA,QAAG,CAAA,CAAE,IAAA,CAAKC,WAAM,GAAG,CAAA;AAC3C;AAKA,eAAe,SAAA,CAAU,KAAa,IAAA,EAAiC;AACrE,EAAA,MAAM,UAAU,MAAMC,gBAAA,CAAQ,KAAK,EAAE,aAAA,EAAe,MAAM,CAAA;AAC1D,EAAA,MAAM,QAAkB,EAAC;AAEzB,EAAA,KAAA,MAAW,SAAS,OA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":3,"file":"etag.cjs.js","sources":["../../src/lib/etag.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createHash } from 'node:crypto';\nimport { readFile, readdir } from 'node:fs/promises';\nimport { join, posix, relative, sep } from 'node:path';\n\ntype ComputeDirectoryEtagOptions = {\n exclude?: string[];\n};\n\nfunction toPosixPath(filePath: string): string {\n return filePath.split(sep).join(posix.sep);\n}\n\n/**\n * Recursively list all files under a directory, returning paths relative to it.\n */\nasync function listFiles(dir: string, base: string): Promise<string[]> {\n const entries = await readdir(dir, { withFileTypes: true });\n const files: string[] = [];\n\n for (const entry of entries) {\n const fullPath = join(dir, entry.name);\n if (entry.isDirectory()) {\n files.push(...(await listFiles(fullPath, base)));\n } else if (entry.isFile()) {\n files.push(toPosixPath(relative(base, fullPath)));\n }\n }\n\n return files;\n}\n\n/**\n * Compute a deterministic sha256 etag for a directory by hashing all file\n * contents. Files are sorted by their relative path so the result is stable\n * regardless of filesystem enumeration order.\n *\n * This mirrors the approach used in CI pipelines:\n * find . -type f | sort | xargs sha256sum | sha256sum\n */\nexport async function computeDirectoryEtag(\n directory: string,\n options: ComputeDirectoryEtagOptions = {},\n): Promise<string> {\n const excludedFiles = new Set(options.exclude ?? []);\n const files = (await listFiles(directory, directory)).filter(\n file => !excludedFiles.has(file),\n );\n files.sort();\n\n const combinedHash = createHash('sha256');\n\n for (const file of files) {\n const content = await readFile(join(directory, file));\n const fileHash = createHash('sha256').update(content).digest('hex');\n combinedHash.update(`${fileHash} ${file}\\n`);\n }\n\n return combinedHash.digest('hex');\n}\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O;AACxB,IAAA,MAAM,UAAU,MAAMC,iBAAA,CAASH,SAAA,CAAK,SAAA,EAAW,IAAI,CAAC,CAAA;AACpD,IAAA,MAAM,QAAA,GAAWE,uBAAW,QAAQ,CAAA,CAAE,OAAO,OAAO,CAAA,CAAE,OAAO,KAAK,CAAA;AAClE,IAAA,YAAA,CAAa,MAAA,CAAO,CAAA,EAAG,QAAQ,CAAA,EAAA,EAAK,IAAI;AAAA,CAAI,CAAA;AAAA,EAC9C;AAEA,EAAA,OAAO,YAAA,CAAa,OAAO,KAAK,CAAA;AAClC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpServer.cjs.js","sources":["../../src/lib/httpServer.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport serveHandler from 'serve-handler';\nimport http from 'node:http';\nimport httpProxy from 'http-proxy';\nimport { createLogger } from './utility';\nimport {\n proxyHtmlWithLivereloadInjection,\n proxyMkdocsLivereload,\n} from './livereload';\n\nexport default class HTTPServer {\n private readonly proxyEndpoint: string;\n private readonly backstageBundleDir: string;\n private readonly backstagePort: number;\n private readonly mkdocsTargetAddress: string;\n private readonly verbose: boolean;\n\n constructor(\n backstageBundleDir: string,\n backstagePort: number,\n mkdocsTargetAddress: string,\n verbose: boolean,\n ) {\n this.proxyEndpoint = '/api/techdocs/';\n this.backstageBundleDir = backstageBundleDir;\n this.backstagePort = backstagePort;\n this.mkdocsTargetAddress = mkdocsTargetAddress;\n this.verbose = verbose;\n }\n\n // Create a Proxy for mkdocs server\n private createProxy() {\n const proxy = httpProxy.createProxyServer({\n target: this.mkdocsTargetAddress,\n });\n\n return (request: http.IncomingMessage): [httpProxy, string] => {\n // If the request path is prefixed with this.proxyEndpoint, remove it.\n const proxyEndpointPath = new RegExp(`^${this.proxyEndpoint}`, 'i');\n const forwardPath = request.url?.replace(proxyEndpointPath, '') || '';\n\n return [proxy, forwardPath];\n };\n }\n\n public async serve(): Promise<http.Server> {\n return new Promise<http.Server>((resolve, reject) => {\n const proxyHandler = this.createProxy();\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n // This endpoint is used by the frontend to issue a cookie for the user.\n // But the MkDocs server doesn't expose it as a the Backstage backend does.\n // So we need to fake it here to prevent 404 errors.\n if (request.url === '/api/techdocs/.backstage/auth/v1/cookie') {\n const oneHourInMilliseconds = 60 * 60 * 1000;\n const expiresAt = new Date(Date.now() + oneHourInMilliseconds);\n const cookie = { expiresAt: expiresAt.toISOString() };\n response.setHeader('Content-Type', 'application/json');\n response.end(JSON.stringify(cookie));\n return;\n }\n\n if (request.url?.startsWith(this.proxyEndpoint)) {\n // Handle HTML files with livereload parameter injection\n if (request.url?.endsWith('.html')) {\n proxyHtmlWithLivereloadInjection({\n request,\n response,\n mkdocsTargetAddress: this.mkdocsTargetAddress,\n proxyEndpoint: this.proxyEndpoint,\n onError: (error: Error) => reject(error),\n });\n return;\n }\n\n // Handle non-HTML files with regular proxy\n const [proxy, forwardPath] = proxyHandler(request);\n\n proxy.on('error', (error: Error) => {\n reject(error);\n });\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n\n request.url = forwardPath;\n proxy.web(request, response);\n return;\n }\n\n // This endpoint is used by the frontend to detect where the backend is running.\n if (request.url === '/.detect') {\n response.setHeader('Content-Type', 'text/plain');\n response.end('techdocs-cli-server');\n return;\n }\n\n // This endpoint is used by the frontend to pass livereload requests to the mkdocs server.\n if (request.url?.startsWith('/.livereload')) {\n proxyMkdocsLivereload({\n request,\n response,\n mkdocsTargetAddress: this.mkdocsTargetAddress,\n onError: (error: Error) => reject(error),\n });\n return;\n }\n\n serveHandler(request, response, {\n public: this.backstageBundleDir,\n trailingSlash: true,\n rewrites: [{ source: '**', destination: 'index.html' }],\n });\n },\n );\n\n const logger = createLogger({ verbose: false });\n server.listen(this.backstagePort, () => {\n if (this.verbose) {\n logger.info(\n `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`,\n );\n }\n resolve(server);\n });\n\n server.on('error', (error: Error) => {\n reject(error);\n });\n });\n }\n}\n"],"names":["httpProxy","http","proxyHtmlWithLivereloadInjection","proxyMkdocsLivereload","serveHandler","createLogger"],"mappings":";;;;;;;;;;;;;;;;AAyBA,MAAqB,UAAA,CAAW;AAAA,EACb,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,aAAA;AAAA,EACA,mBAAA;AAAA,EACA,OAAA;AAAA,EAEjB,WAAA,CACE,kBAAA,EACA,aAAA,EACA,mBAAA,EACA,OAAA,EACA;AACA,IAAA,IAAA,CAAK,aAAA,GAAgB,gBAAA;AACrB,IAAA,IAAA,CAAK,kBAAA,GAAqB,kBAAA;AAC1B,IAAA,IAAA,CAAK,aAAA,GAAgB,aAAA;AACrB,IAAA,IAAA,CAAK,mBAAA,GAAsB,mBAAA;AAC3B,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AAAA;AAAA,EAGQ,WAAA,GAAc;AACpB,IAAA,MAAM,KAAA,GAAQA,2BAAU,iBAAA,CAAkB;AAAA,MACxC,QAAQ,IAAA,CAAK;AAAA,KACd,CAAA;AAED,IAAA,OAAO,CAAC,OAAA,KAAuD;AAE7D,MAAA,MAAM,oBAAoB,IAAI,MAAA,CAAO,IAAI,IAAA,CAAK,aAAa,IAAI,GAAG,CAAA;AAClE,MAAA,MAAM,cAAc,OAAA,CAAQ,GAAA,EAAK,OAAA,CAAQ,iBAAA,EAAmB,EAAE,CAAA,IAAK,EAAA;AAEnE,MAAA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AAoF,KAAK,aAAa,CAAA;AAAA,WACxG;AAAA,QACF;AACA,QAAA,OAAA,CAAQ,MAAM,CAAA;AAAA,MAChB,CAAC,CAAA;AAED,MAAA,MAAA,CAAO,EAAA,CAAG,OAAA,EAAS,CAAC,KAAA,KAAiB;AACnC,QAAA,MAAA,CAAO,KAAK,CAAA;AAAA,MACd,CAAC,CAAA;AAAA,IACH,CAAC,CAAA;AAAA,EACH;AACF
|
|
1
|
+
{"version":3,"file":"httpServer.cjs.js","sources":["../../src/lib/httpServer.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport serveHandler from 'serve-handler';\nimport http from 'node:http';\nimport httpProxy from 'http-proxy';\nimport { createLogger } from './utility';\nimport {\n proxyHtmlWithLivereloadInjection,\n proxyMkdocsLivereload,\n} from './livereload';\n\nexport default class HTTPServer {\n private readonly proxyEndpoint: string;\n private readonly backstageBundleDir: string;\n private readonly backstagePort: number;\n private readonly mkdocsTargetAddress: string;\n private readonly verbose: boolean;\n\n constructor(\n backstageBundleDir: string,\n backstagePort: number,\n mkdocsTargetAddress: string,\n verbose: boolean,\n ) {\n this.proxyEndpoint = '/api/techdocs/';\n this.backstageBundleDir = backstageBundleDir;\n this.backstagePort = backstagePort;\n this.mkdocsTargetAddress = mkdocsTargetAddress;\n this.verbose = verbose;\n }\n\n // Create a Proxy for mkdocs server\n private createProxy() {\n const proxy = httpProxy.createProxyServer({\n target: this.mkdocsTargetAddress,\n });\n\n return (request: http.IncomingMessage): [httpProxy, string] => {\n // If the request path is prefixed with this.proxyEndpoint, remove it.\n const proxyEndpointPath = new RegExp(`^${this.proxyEndpoint}`, 'i');\n const forwardPath = request.url?.replace(proxyEndpointPath, '') || '';\n\n return [proxy, forwardPath];\n };\n }\n\n public async serve(): Promise<http.Server> {\n return new Promise<http.Server>((resolve, reject) => {\n const proxyHandler = this.createProxy();\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n // This endpoint is used by the frontend to issue a cookie for the user.\n // But the MkDocs server doesn't expose it as a the Backstage backend does.\n // So we need to fake it here to prevent 404 errors.\n if (request.url === '/api/techdocs/.backstage/auth/v1/cookie') {\n const oneHourInMilliseconds = 60 * 60 * 1000;\n const expiresAt = new Date(Date.now() + oneHourInMilliseconds);\n const cookie = { expiresAt: expiresAt.toISOString() };\n response.setHeader('Content-Type', 'application/json');\n response.end(JSON.stringify(cookie));\n return;\n }\n\n if (request.url?.startsWith(this.proxyEndpoint)) {\n // Handle HTML files with livereload parameter injection\n if (request.url?.endsWith('.html')) {\n proxyHtmlWithLivereloadInjection({\n request,\n response,\n mkdocsTargetAddress: this.mkdocsTargetAddress,\n proxyEndpoint: this.proxyEndpoint,\n onError: (error: Error) => reject(error),\n });\n return;\n }\n\n // Handle non-HTML files with regular proxy\n const [proxy, forwardPath] = proxyHandler(request);\n\n proxy.on('error', (error: Error) => {\n reject(error);\n });\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n\n request.url = forwardPath;\n proxy.web(request, response);\n return;\n }\n\n // This endpoint is used by the frontend to detect where the backend is running.\n if (request.url === '/.detect') {\n response.setHeader('Content-Type', 'text/plain');\n response.end('techdocs-cli-server');\n return;\n }\n\n // This endpoint is used by the frontend to pass livereload requests to the mkdocs server.\n if (request.url?.startsWith('/.livereload')) {\n proxyMkdocsLivereload({\n request,\n response,\n mkdocsTargetAddress: this.mkdocsTargetAddress,\n onError: (error: Error) => reject(error),\n });\n return;\n }\n\n serveHandler(request, response, {\n public: this.backstageBundleDir,\n trailingSlash: true,\n rewrites: [{ source: '**', destination: 'index.html' }],\n });\n },\n );\n\n const logger = createLogger({ verbose: false });\n server.listen(this.backstagePort, () => {\n if (this.verbose) {\n logger.info(\n `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`,\n );\n }\n resolve(server);\n });\n\n server.on('error', (error: Error) => {\n reject(error);\n });\n });\n }\n}\n"],"names":["httpProxy","http","proxyHtmlWithLivereloadInjection","proxyMkdocsLivereload","serveHandler","createLogger"],"mappings":";;;;;;;;;;;;;;;;AAyBA,MAAqB,UAAA,CAAW;AAAA,EACb,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,aAAA;AAAA,EACA,mBAAA;AAAA,EACA,OAAA;AAAA,EAEjB,WAAA,CACE,kBAAA,EACA,aAAA,EACA,mBAAA,EACA,OAAA,EACA;AACA,IAAA,IAAA,CAAK,aAAA,GAAgB,gBAAA;AACrB,IAAA,IAAA,CAAK,kBAAA,GAAqB,kBAAA;AAC1B,IAAA,IAAA,CAAK,aAAA,GAAgB,aAAA;AACrB,IAAA,IAAA,CAAK,mBAAA,GAAsB,mBAAA;AAC3B,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AAAA;AAAA,EAGQ,WAAA,GAAc;AACpB,IAAA,MAAM,KAAA,GAAQA,2BAAU,iBAAA,CAAkB;AAAA,MACxC,QAAQ,IAAA,CAAK;AAAA,KACd,CAAA;AAED,IAAA,OAAO,CAAC,OAAA,KAAuD;AAE7D,MAAA,MAAM,oBAAoB,IAAI,MAAA,CAAO,IAAI,IAAA,CAAK,aAAa,IAAI,GAAG,CAAA;AAClE,MAAA,MAAM,cAAc,OAAA,CAAQ,GAAA,EAAK,OAAA,CAAQ,iBAAA,EAAmB,EAAE,CAAA,IAAK,EAAA;AAEnE,MAAA,OAAO,CAAC,OAAO,WAAW,CAAA;AAAA,IAC5B,CAAA;AAAA,EACF;AAAA,EAEA,MAAa,KAAA,GAA8B;AACzC,IAAA,OAAO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ED,MAAA,MAAA,CAAO,EAAA,CAAG,OAAA,EAAS,CAAC,KAAA,KAAiB;AACnC,QAAA,MAAA,CAAO,KAAK,CAAA;AAAA,MACd,CAAC,CAAA;AAAA,IACH,CAAC,CAAA;AAAA,EACH;AACF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livereload.cjs.js","sources":["../../src/lib/livereload.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport http from 'node:http';\nimport httpProxy from 'http-proxy';\n\n/**\n * Livereload support for techdocs-cli.\n *\n * Context:\n * - MkDocs implements autoreload using a long-poll endpoint `/livereload` and a script that injects\n * a call like: `livereload(epoch, request_id)`, where `epoch` is derived from Python's\n * `time.monotonic()`.\n * - Node.js monotonic clocks (`process.hrtime`/`performance.now`) are not compatible with Python's\n * value across processes and platforms. We therefore CANNOT reliably re-create the same epoch on\n * the frontend or in this CLI, and must read the values produced by MkDocs itself.\n * - The MkDocs script tag is removed by DOM sanitization (DomPurify) in TechDocs, so we can't rely\n * on the script being present in the embedded app. To bridge this, we extract the parameters on\n * the server side while proxying HTML and inject them as a safe custom element that survives\n * sanitization: `<live-reload live-reload-epoch=\"…\" live-reload-request-id=\"…\"/>`.\n * - The frontend addon reads that element and polls `/.livereload` (served by techdocs-cli), which\n * this module maps to MkDocs `/livereload` with permissive CORS headers.\n * - Quality-of-life: if extraction fails or the endpoint is unavailable, normal docs still work.\n *\n * See issue for background and rationale: https://github.com/backstage/backstage/issues/30514\n */\n\nconst LIVE_RELOAD_ELEMENT = 'live-reload';\nconst LIVE_RELOAD_ATTR_EPOCH = 'live-reload-epoch';\nconst LIVE_RELOAD_ATTR_REQUEST_ID = 'live-reload-request-id';\nconst CLI_LIVERELOAD_PATH = '/.livereload';\nconst MKDOCS_LIVERELOAD_PATH = '/livereload';\nconst CONTENT_TYPE_HTML = 'text/html';\nconst HEADER_CONTENT_LENGTH = 'content-length';\n\nconst BODY_START_RE = /<body\\b[^>]*>/;\n// Matches mkdocs injected call livereload(epoch, requestId)\nconst MKDOCS_LIVERELOAD_CALL_RE = /livereload\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)\\s*;?/;\n\n/**\n * Extract livereload parameters from mkdocs HTML and inject them as a custom element.\n * The injected element will later be read by the frontend addon even after DOM sanitization.\n *\n * Note:\n * - we don't add to <head> because of DomPurify sanitization.\n * - we add close to the body opening to avoid reading too far into the body.\n * - we should use streamed injection to improve performance.\n */\nexport function injectLivereloadParameters(html: string): string {\n const livereloadMatch = html.match(MKDOCS_LIVERELOAD_CALL_RE);\n\n // If we couldn't find livereload parameters, return original HTML untouched.\n if (!livereloadMatch) {\n return html;\n }\n\n const [, epoch, requestId] = livereloadMatch;\n // Insert a minimal custom element that the frontend addon can discover post-sanitization.\n // Note: embedded app needs a custom config to allow the element to survive sanitization.\n const liveReloadTag = `<${LIVE_RELOAD_ELEMENT} ${LIVE_RELOAD_ATTR_EPOCH}=\"${epoch}\" ${LIVE_RELOAD_ATTR_REQUEST_ID}=\"${requestId}\"></${LIVE_RELOAD_ELEMENT}>`;\n\n // Naively find where to insert the livereload tag.\n const bodyStart = html.match(BODY_START_RE);\n const bodyStartIndex = bodyStart?.index ?? 0;\n const bodyStartLength = bodyStart?.[0]?.length ?? 0;\n if (bodyStartIndex === 0 || bodyStartLength === 0) {\n return html;\n }\n const bodyEndIndex = bodyStartIndex + bodyStartLength;\n\n return html.slice(0, bodyEndIndex) + liveReloadTag + html.slice(bodyEndIndex);\n}\n\nfunction setCorsHeaders(response: http.ServerResponse) {\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n}\n\n/**\n * Proxies a mkdocs HTML response, injecting livereload parameters into the HTML body.\n */\nexport function proxyHtmlWithLivereloadInjection(options: {\n request: http.IncomingMessage;\n response: http.ServerResponse;\n mkdocsTargetAddress: string;\n proxyEndpoint: string;\n onError: (error: Error) => void;\n}): void {\n const { request, response, mkdocsTargetAddress, proxyEndpoint, onError } =\n options;\n\n const htmlProxy = httpProxy.createProxyServer({\n target: mkdocsTargetAddress,\n selfHandleResponse: true,\n });\n\n htmlProxy.on('error', onError);\n\n // Intercept HTML responses to inject `<live-reload …>`\n htmlProxy.on('proxyRes', (proxyRes, _req, res) => {\n const contentType = proxyRes.headers['content-type'];\n const contentEncoding = proxyRes.headers['content-encoding'];\n const isHtml =\n contentType &&\n typeof contentType === 'string' &&\n contentType.startsWith(CONTENT_TYPE_HTML);\n if (isHtml && !contentEncoding) {\n const chunks: Buffer[] = [];\n proxyRes.on('data', (chunk: Buffer | string) => {\n chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n });\n proxyRes.on('end', () => {\n const body = Buffer.concat(chunks).toString('utf8');\n const modifiedHtml = injectLivereloadParameters(body);\n res.statusCode = (proxyRes.statusCode as number | undefined) ?? 200;\n Object.keys(proxyRes.headers).forEach(key => {\n if (key.toLowerCase() !== HEADER_CONTENT_LENGTH) {\n res.setHeader(key, proxyRes.headers[key]!);\n }\n });\n setCorsHeaders(res);\n res.end(modifiedHtml);\n });\n } else {\n res.statusCode = (proxyRes.statusCode as number | undefined) ?? 200;\n Object.keys(proxyRes.headers).forEach(key => {\n res.setHeader(key, proxyRes.headers[key]!);\n });\n setCorsHeaders(res);\n proxyRes.pipe(res);\n }\n });\n\n const forwardPath =\n request.url?.replace(new RegExp(`^${proxyEndpoint}`, 'i'), '') || '';\n request.url = forwardPath;\n htmlProxy.web(request, response);\n}\n\n/**\n * Proxies mkdocs livereload long-polling requests, mapping the CLI path to mkdocs path.\n */\nexport function proxyMkdocsLivereload(options: {\n request: http.IncomingMessage;\n response: http.ServerResponse;\n mkdocsTargetAddress: string;\n onError: (error: Error) => void;\n}): void {\n const { request, response, mkdocsTargetAddress, onError } = options;\n\n const proxy = httpProxy.createProxyServer({ target: mkdocsTargetAddress });\n proxy.on('error', onError);\n\n setCorsHeaders(response);\n response.setHeader('Access-Control-Allow-Headers', 'Content-Type');\n\n request.url = request.url?.replace(\n CLI_LIVERELOAD_PATH,\n MKDOCS_LIVERELOAD_PATH,\n );\n proxy.web(request, response);\n}\n"],"names":["httpProxy"],"mappings":";;;;;;;;AAwCA,MAAM,mBAAA,GAAsB,aAAA;AAC5B,MAAM,sBAAA,GAAyB,mBAAA;AAC/B,MAAM,2BAAA,GAA8B,wBAAA;AACpC,MAAM,mBAAA,GAAsB,cAAA;AAC5B,MAAM,sBAAA,GAAyB,aAAA;AAC/B,MAAM,iBAAA,GAAoB,WAAA;AAC1B,MAAM,qBAAA,GAAwB,gBAAA;AAE9B,MAAM,aAAA,GAAgB,eAAA;AAEtB,MAAM,yBAAA,GAA4B,4CAAA;AAW3B,SAAS,2BAA2B,IAAA,EAAsB;AAC/D,EAAA,MAAM,eAAA,GAAkB,IAAA,CAAK,KAAA,CAAM,yBAAyB,CAAA;AAG5D,EAAA,IAAI,CAAC,eAAA,EAAiB;AACpB,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,GAAG,KAAA,EAAO,SAAS,CAAA,GAAI,eAAA;AAG7B,EAAA,MAAM,aAAA,GAAgB,CAAA,CAAA,EAAI,mBAAmB,CAAA,CAAA,EAAI,sBAAsB,CAAA,EAAA,EAAK,KAAK,CAAA,EAAA,EAAK,2BAA2B,CAAA,EAAA,EAAK,SAAS,CAAA,IAAA,EAAO,mBAAmB,CAAA,CAAA,CAAA;AAGzJ,EAAA,MAAM,SAAA,GAAY,IAAA,CAAK,KAAA,CAAM,aAAa,CAAA;AAC1C,EAAA,MAAM,cAAA,GA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F,CAAC,CAAA;AAED,EAAA,MAAM,WAAA,GACJ,OAAA,CAAQ,GAAA,EAAK,OAAA,CAAQ,IAAI,MAAA,CAAO,CAAA,CAAA,EAAI,aAAa,CAAA,CAAA,EAAI,GAAG,CAAA,EAAG,EAAE,CAAA,IAAK,EAAA;AACpE,EAAA,OAAA,CAAQ,GAAA,GAAM,WAAA;AACd,EAAA,SAAA,CAAU,GAAA,CAAI,SAAS,QAAQ,CAAA;AACjC;AAKO,SAAS,sBAAsB,OAAA,EAK7B;AACP,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,mBAAA,EAAqB,SAAQ,GAAI,OAAA;AAE5D,EAAA,MAAM,QAAQA,0BAAA,CAAU,iBAAA,CAAkB,EAAE,MAAA,EAAQ,qBAAqB,CAAA;AACzE,EAAA,KAAA,CAAM,EAAA,CAAG,SAAS,OAAO,CAAA;AAEzB,EAAA,cAAA,CAAe,QAAQ,CAAA;AACvB,EAAA,QAAA,CAAS,SAAA,CAAU,gCAAgC,cAAc,CAAA;AAEjE,EAAA,OAAA,CAAQ,GAAA,GAAM,QAAQ,GAAA,EAAK,OAAA;AAAA,IACzB,mBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,KAAA,CAAM,GAAA,CAAI,SAAS,QAAQ,CAAA;AAC7B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"livereload.cjs.js","sources":["../../src/lib/livereload.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport http from 'node:http';\nimport httpProxy from 'http-proxy';\n\n/**\n * Livereload support for techdocs-cli.\n *\n * Context:\n * - MkDocs implements autoreload using a long-poll endpoint `/livereload` and a script that injects\n * a call like: `livereload(epoch, request_id)`, where `epoch` is derived from Python's\n * `time.monotonic()`.\n * - Node.js monotonic clocks (`process.hrtime`/`performance.now`) are not compatible with Python's\n * value across processes and platforms. We therefore CANNOT reliably re-create the same epoch on\n * the frontend or in this CLI, and must read the values produced by MkDocs itself.\n * - The MkDocs script tag is removed by DOM sanitization (DomPurify) in TechDocs, so we can't rely\n * on the script being present in the embedded app. To bridge this, we extract the parameters on\n * the server side while proxying HTML and inject them as a safe custom element that survives\n * sanitization: `<live-reload live-reload-epoch=\"…\" live-reload-request-id=\"…\"/>`.\n * - The frontend addon reads that element and polls `/.livereload` (served by techdocs-cli), which\n * this module maps to MkDocs `/livereload` with permissive CORS headers.\n * - Quality-of-life: if extraction fails or the endpoint is unavailable, normal docs still work.\n *\n * See issue for background and rationale: https://github.com/backstage/backstage/issues/30514\n */\n\nconst LIVE_RELOAD_ELEMENT = 'live-reload';\nconst LIVE_RELOAD_ATTR_EPOCH = 'live-reload-epoch';\nconst LIVE_RELOAD_ATTR_REQUEST_ID = 'live-reload-request-id';\nconst CLI_LIVERELOAD_PATH = '/.livereload';\nconst MKDOCS_LIVERELOAD_PATH = '/livereload';\nconst CONTENT_TYPE_HTML = 'text/html';\nconst HEADER_CONTENT_LENGTH = 'content-length';\n\nconst BODY_START_RE = /<body\\b[^>]*>/;\n// Matches mkdocs injected call livereload(epoch, requestId)\nconst MKDOCS_LIVERELOAD_CALL_RE = /livereload\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)\\s*;?/;\n\n/**\n * Extract livereload parameters from mkdocs HTML and inject them as a custom element.\n * The injected element will later be read by the frontend addon even after DOM sanitization.\n *\n * Note:\n * - we don't add to <head> because of DomPurify sanitization.\n * - we add close to the body opening to avoid reading too far into the body.\n * - we should use streamed injection to improve performance.\n */\nexport function injectLivereloadParameters(html: string): string {\n const livereloadMatch = html.match(MKDOCS_LIVERELOAD_CALL_RE);\n\n // If we couldn't find livereload parameters, return original HTML untouched.\n if (!livereloadMatch) {\n return html;\n }\n\n const [, epoch, requestId] = livereloadMatch;\n // Insert a minimal custom element that the frontend addon can discover post-sanitization.\n // Note: embedded app needs a custom config to allow the element to survive sanitization.\n const liveReloadTag = `<${LIVE_RELOAD_ELEMENT} ${LIVE_RELOAD_ATTR_EPOCH}=\"${epoch}\" ${LIVE_RELOAD_ATTR_REQUEST_ID}=\"${requestId}\"></${LIVE_RELOAD_ELEMENT}>`;\n\n // Naively find where to insert the livereload tag.\n const bodyStart = html.match(BODY_START_RE);\n const bodyStartIndex = bodyStart?.index ?? 0;\n const bodyStartLength = bodyStart?.[0]?.length ?? 0;\n if (bodyStartIndex === 0 || bodyStartLength === 0) {\n return html;\n }\n const bodyEndIndex = bodyStartIndex + bodyStartLength;\n\n return html.slice(0, bodyEndIndex) + liveReloadTag + html.slice(bodyEndIndex);\n}\n\nfunction setCorsHeaders(response: http.ServerResponse) {\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n}\n\n/**\n * Proxies a mkdocs HTML response, injecting livereload parameters into the HTML body.\n */\nexport function proxyHtmlWithLivereloadInjection(options: {\n request: http.IncomingMessage;\n response: http.ServerResponse;\n mkdocsTargetAddress: string;\n proxyEndpoint: string;\n onError: (error: Error) => void;\n}): void {\n const { request, response, mkdocsTargetAddress, proxyEndpoint, onError } =\n options;\n\n const htmlProxy = httpProxy.createProxyServer({\n target: mkdocsTargetAddress,\n selfHandleResponse: true,\n });\n\n htmlProxy.on('error', onError);\n\n // Intercept HTML responses to inject `<live-reload …>`\n htmlProxy.on('proxyRes', (proxyRes, _req, res) => {\n const contentType = proxyRes.headers['content-type'];\n const contentEncoding = proxyRes.headers['content-encoding'];\n const isHtml =\n contentType &&\n typeof contentType === 'string' &&\n contentType.startsWith(CONTENT_TYPE_HTML);\n if (isHtml && !contentEncoding) {\n const chunks: Buffer[] = [];\n proxyRes.on('data', (chunk: Buffer | string) => {\n chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n });\n proxyRes.on('end', () => {\n const body = Buffer.concat(chunks).toString('utf8');\n const modifiedHtml = injectLivereloadParameters(body);\n res.statusCode = (proxyRes.statusCode as number | undefined) ?? 200;\n Object.keys(proxyRes.headers).forEach(key => {\n if (key.toLowerCase() !== HEADER_CONTENT_LENGTH) {\n res.setHeader(key, proxyRes.headers[key]!);\n }\n });\n setCorsHeaders(res);\n res.end(modifiedHtml);\n });\n } else {\n res.statusCode = (proxyRes.statusCode as number | undefined) ?? 200;\n Object.keys(proxyRes.headers).forEach(key => {\n res.setHeader(key, proxyRes.headers[key]!);\n });\n setCorsHeaders(res);\n proxyRes.pipe(res);\n }\n });\n\n const forwardPath =\n request.url?.replace(new RegExp(`^${proxyEndpoint}`, 'i'), '') || '';\n request.url = forwardPath;\n htmlProxy.web(request, response);\n}\n\n/**\n * Proxies mkdocs livereload long-polling requests, mapping the CLI path to mkdocs path.\n */\nexport function proxyMkdocsLivereload(options: {\n request: http.IncomingMessage;\n response: http.ServerResponse;\n mkdocsTargetAddress: string;\n onError: (error: Error) => void;\n}): void {\n const { request, response, mkdocsTargetAddress, onError } = options;\n\n const proxy = httpProxy.createProxyServer({ target: mkdocsTargetAddress });\n proxy.on('error', onError);\n\n setCorsHeaders(response);\n response.setHeader('Access-Control-Allow-Headers', 'Content-Type');\n\n request.url = request.url?.replace(\n CLI_LIVERELOAD_PATH,\n MKDOCS_LIVERELOAD_PATH,\n );\n proxy.web(request, response);\n}\n"],"names":["httpProxy"],"mappings":";;;;;;;;AAwCA,MAAM,mBAAA,GAAsB,aAAA;AAC5B,MAAM,sBAAA,GAAyB,mBAAA;AAC/B,MAAM,2BAAA,GAA8B,wBAAA;AACpC,MAAM,mBAAA,GAAsB,cAAA;AAC5B,MAAM,sBAAA,GAAyB,aAAA;AAC/B,MAAM,iBAAA,GAAoB,WAAA;AAC1B,MAAM,qB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,SAAA,CAAU,gCAAgC,cAAc,CAAA;AAEjE,EAAA,OAAA,CAAQ,GAAA,GAAM,QAAQ,GAAA,EAAK,OAAA;AAAA,IACzB,mBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,KAAA,CAAM,GAAA,CAAI,SAAS,QAAQ,CAAA;AAC7B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mkdocsServer.cjs.js","sources":["../../src/lib/mkdocsServer.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { run, RunChildProcess, RunOnOutput } from '@backstage/cli-common';\n\nexport const runMkdocsServer = (options: {\n port?: string;\n useDocker?: boolean;\n dockerImage?: string;\n dockerEntrypoint?: string;\n dockerOptions?: string[];\n onStdout?: RunOnOutput;\n onStderr?: RunOnOutput;\n mkdocsConfigFileName?: string;\n mkdocsParameterClean?: boolean;\n mkdocsParameterDirtyReload?: boolean;\n mkdocsParameterStrict?: boolean;\n}): RunChildProcess => {\n const port = options.port ?? '8000';\n const useDocker = options.useDocker ?? true;\n const dockerImage = options.dockerImage ?? 'spotify/techdocs';\n\n if (useDocker) {\n return run(\n [\n 'docker',\n 'run',\n '--rm',\n '-w',\n '/content',\n '-v',\n `${process.cwd()}:/content`,\n '-p',\n `${port}:${port}`,\n '-it',\n ...(options.dockerEntrypoint\n ? ['--entrypoint', options.dockerEntrypoint]\n : []),\n ...(options.dockerOptions || []),\n dockerImage,\n 'serve',\n '--dev-addr',\n `0.0.0.0:${port}`,\n '--livereload',\n ...(options.mkdocsConfigFileName\n ? ['--config-file', options.mkdocsConfigFileName]\n : []),\n ...(options.mkdocsParameterClean ? ['--clean'] : []),\n ...(options.mkdocsParameterDirtyReload ? ['--dirtyreload'] : []),\n ...(options.mkdocsParameterStrict ? ['--strict'] : []),\n ],\n {\n onStdout: options.onStdout,\n onStderr: options.onStderr,\n },\n );\n }\n\n return run(\n [\n 'mkdocs',\n 'serve',\n '--dev-addr',\n `127.0.0.1:${port}`,\n '--livereload',\n ...(options.mkdocsConfigFileName\n ? ['--config-file', options.mkdocsConfigFileName]\n : []),\n ...(options.mkdocsParameterClean ? ['--clean'] : []),\n ...(options.mkdocsParameterDirtyReload ? ['--dirtyreload'] : []),\n ...(options.mkdocsParameterStrict ? ['--strict'] : []),\n ],\n {\n onStdout: options.onStdout,\n onStderr: options.onStderr,\n },\n );\n};\n"],"names":["run"],"mappings":";;;;AAkBO,MAAM,eAAA,GAAkB,CAAC,OAAA,KAYT;AACrB,EAAA,MAAM,IAAA,GAAO,QAAQ,IAAA,IAAQ,MAAA;AAC7B,EAAA,MAAM,SAAA,GAAY,QAAQ,SAAA,IAAa,IAAA;AACvC,EAAA,MAAM,WAAA,GAAc,QAAQ,WAAA,IAAe,kBAAA;AAE3C,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,OAAOA,aAAA;AAAA,MACL;AAAA,QACE,QAAA;AAAA,QACA,KAAA;AAAA,QACA,MAAA;AAAA,QACA,IAAA;AAAA,QACA,UAAA;AAAA,QACA,IAAA;AAAA,QACA,CAAA,EAAG,OAAA,CAAQ,GAAA,EAAK,CAAA,SAAA,CAAA;AAAA,QAChB,IAAA;AAAA,QACA,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA;AAAA,QACf,KAAA;AAAA,QACA,GAAI,QAAQ,gBAAA,GACR,CAAC,gBAAgB,OAAA,CAAQ,gBAAgB,IACzC,EAAC;AAAA,QACL,GAAI,OAAA,CAAQ,aAAA,IAAiB,EAAC;AAAA,QAC9B,WAAA;AAAA,QACA,OAAA;AAAA,QACA,YAAA;AAAA,QACA,WAAW,IAAI,CAAA,CAAA;AAAA,QACf,cAAA;AAAA,QACA,GAAI,QAAQ,oBAAA,GACR,CAAC,iBAAiB,OAAA,CAAQ,oBAAoB,IAC9C,EAAC;AAAA,QACL,GAAI,OAAA,CAAQ,oBAAA,GAAuB,CAAC,SAAS,IAAI,EAAC;AAAA,QAClD,GAAI,OAAA,CAAQ,0BAAA,GAA6B,CAAC,eAAe,IAAI,EAAC;AAAA,QAC9D,GAAI,OAAA,CAAQ,qBAAA,GAAwB,CAAC,UAAU,IAAI;AAAC,OACtD;AAAA,MACA;AAAA,QACE,UAAU,OAAA,CAAQ,QAAA;AAAA,QAClB,UAAU,OAAA,CAAQ;AAAA;AACpB,KACF;AAAA,EACF;AAEA,EAAA,OAAOA,aAAA;AAAA,IACL;AAAA,MACE,QAAA;AAAA,MACA,OAAA;AAAA,MACA,YAAA;AAAA,MACA,aAAa,IAAI,CAAA,CAAA;AAAA,MACjB,cAAA;AAAA,MACA,GAAI,QAAQ,oBAAA,GACR,CAAC,iBAAiB,OAAA,CAAQ,oBAAoB,IAC9C,EAAC;AAAA,MACL,GAAI,OAAA,CAAQ,oBAAA,GAAuB,CAAC,SAAS,IAAI,EAAC;AAAA,MAClD,GAAI,OAAA,CAAQ,0BAAA,GAA6B,CAAC,eAAe,IAAI,EAAC;AAAA,MAC9D,GAAI,OAAA,CAAQ,qBAAA,GAAwB,CAAC,UAAU,IAAI;AAAC,KACtD;AAAA,IACA;AAAA,MACE,UAAU,OAAA,CAAQ,QAAA;AAAA,MAClB,UAAU,OAAA,CAAQ;AAAA;AACpB,GACF;AACF
|
|
1
|
+
{"version":3,"file":"mkdocsServer.cjs.js","sources":["../../src/lib/mkdocsServer.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { run, RunChildProcess, RunOnOutput } from '@backstage/cli-common';\n\nexport const runMkdocsServer = (options: {\n port?: string;\n useDocker?: boolean;\n dockerImage?: string;\n dockerEntrypoint?: string;\n dockerOptions?: string[];\n onStdout?: RunOnOutput;\n onStderr?: RunOnOutput;\n mkdocsConfigFileName?: string;\n mkdocsParameterClean?: boolean;\n mkdocsParameterDirtyReload?: boolean;\n mkdocsParameterStrict?: boolean;\n}): RunChildProcess => {\n const port = options.port ?? '8000';\n const useDocker = options.useDocker ?? true;\n const dockerImage = options.dockerImage ?? 'spotify/techdocs';\n\n if (useDocker) {\n return run(\n [\n 'docker',\n 'run',\n '--rm',\n '-w',\n '/content',\n '-v',\n `${process.cwd()}:/content`,\n '-p',\n `${port}:${port}`,\n '-it',\n ...(options.dockerEntrypoint\n ? ['--entrypoint', options.dockerEntrypoint]\n : []),\n ...(options.dockerOptions || []),\n dockerImage,\n 'serve',\n '--dev-addr',\n `0.0.0.0:${port}`,\n '--livereload',\n ...(options.mkdocsConfigFileName\n ? ['--config-file', options.mkdocsConfigFileName]\n : []),\n ...(options.mkdocsParameterClean ? ['--clean'] : []),\n ...(options.mkdocsParameterDirtyReload ? ['--dirtyreload'] : []),\n ...(options.mkdocsParameterStrict ? ['--strict'] : []),\n ],\n {\n onStdout: options.onStdout,\n onStderr: options.onStderr,\n },\n );\n }\n\n return run(\n [\n 'mkdocs',\n 'serve',\n '--dev-addr',\n `127.0.0.1:${port}`,\n '--livereload',\n ...(options.mkdocsConfigFileName\n ? ['--config-file', options.mkdocsConfigFileName]\n : []),\n ...(options.mkdocsParameterClean ? ['--clean'] : []),\n ...(options.mkdocsParameterDirtyReload ? ['--dirtyreload'] : []),\n ...(options.mkdocsParameterStrict ? ['--str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AU,OAAA,CAAQ;AAAA;AACpB,KACF;AAAA,EACF;AAEA,EAAA,OAAOA,aAAA;AAAA,IACL;AAAA,MACE,QAAA;AAAA,MACA,OAAA;AAAA,MACA,YAAA;AAAA,MACA,aAAa,IAAI,CAAA,CAAA;AAAA,MACjB,cAAA;AAAA,MACA,GAAI,QAAQ,oBAAA,GACR,CAAC,iBAAiB,OAAA,CAAQ,oBAAoB,IAC9C,EAAC;AAAA,MACL,GAAI,OAAA,CAAQ,oBAAA,GAAuB,CAAC,SAAS,IAAI,EAAC;AAAA,MAClD,GAAI,OAAA,CAAQ,0BAAA,GAA6B,CAAC,eAAe,IAAI,EAAC;AAAA,MAC9D,GAAI,OAAA,CAAQ,qBAAA,GAAwB,CAAC,UAAU,IAAI;AAAC,KACtD;AAAA,IACA;AAAA,MACE,UAAU,OAAA,CAAQ,QAAA;AAAA,MAClB,UAAU,OAAA,CAAQ;AAAA;AACpB,GACF;AACF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.cjs.js","sources":["../../src/lib/utility.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n RemoteProtocol,\n ParsedLocationAnnotation,\n} from '@backstage/plugin-techdocs-node';\nimport * as winston from 'winston';\nimport { Writable } from 'node:stream';\nimport { stdout } from 'node:process';\n\nexport const convertTechDocsRefToLocationAnnotation = (\n techdocsRef: string,\n): ParsedLocationAnnotation => {\n // Split on the first colon for the protocol and the rest after the first split\n // is the location.\n const [type, target] = techdocsRef.split(/:(.+)/) as [\n RemoteProtocol?,\n string?,\n ];\n\n if (!type || !target) {\n throw new Error(\n `Can not parse --techdocs-ref ${techdocsRef}. Should be of type HOST:URL.`,\n );\n }\n\n return { type, target };\n};\n\nexport const createLogger = ({\n verbose = false,\n}: {\n verbose: boolean;\n}): winston.Logger => {\n const logger = winston.createLogger({\n level: verbose ? 'verbose' : 'info',\n transports: [\n new winston.transports.Console({ format: winston.format.simple() }),\n ],\n });\n\n return logger;\n};\n\nexport const getLogStream = (logger: winston.Logger): Writable => {\n if (process.env.LOG_LEVEL === 'debug') {\n return stdout;\n }\n\n return new Writable({\n defaultEncoding: 'utf8',\n write(chunk, _encoding, next) {\n logger.verbose(chunk.toString().trim());\n next();\n },\n });\n};\n"],"names":["winston","stdout","Writable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,sCAAA,GAAyC,CACpD,WAAA,KAC6B;AAG7B,EAAA,MAAM,CAAC,IAAA,EAAM,MAAM,CAAA,GAAI,WAAA,CAAY,MAAM,OAAO,CAAA;AAKhD,EAAA,IAAI,CAAC,IAAA,IAAQ,CAAC,MAAA,EAAQ;AACpB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,gCAAgC,WAAW,CAAA,6BAAA;AAAA,KAC7C;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,MAAM,MAAA,EAAO;AACxB;AAEO,MAAM,eAAe,CAAC;AAAA,EAC3B,OAAA,GAAU;AACZ,CAAA,KAEsB;AACpB,EAAA,MAAM,MAAA,GAASA,mBAAQ,YAAA,CAAa;AAAA,IAClC,KAAA,EAAO,UAAU,SAAA,GAAY,MAAA;AAAA,IAC7B,UAAA,EAAY;AAAA,MACV,IAAIA,kBAAA,CAAQ,UAAA,CAAW,OAAA,CAAQ,EAAE,QAAQA,kBAAA,CAAQ,MAAA,CAAO,MAAA,EAAO,EAAG;AAAA;AACpE,GACD,CAAA;AAED,EAAA,OAAO,MAAA;AACT;AAEO,MAAM,YAAA,GAAe,CAAC,MAAA,KAAqC;AAChE,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,SAAA,KAAc,OAAA,EAAS;AACrC,IAAA,OAAOC,mBAAA;AAAA,EACT;AAEA,EAAA,OAAO,IAAIC,oBAAA,CAAS;AAAA,IAClB,eAAA,EAAiB,MAAA;AAAA,IACjB,KAAA,CAAM,KAAA,EAAO,SAAA,EAAW,IAAA,EAAM;AAC5B,MAAA,MAAA,CAAO,OAAA,CAAQ,KAAA,CAAM,QAAA,EAAS,CAAE,MAAM,CAAA;AACtC,MAAA,IAAA,EAAK;AAAA,IACP;AAAA,GACD,CAAA;AACH
|
|
1
|
+
{"version":3,"file":"utility.cjs.js","sources":["../../src/lib/utility.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n RemoteProtocol,\n ParsedLocationAnnotation,\n} from '@backstage/plugin-techdocs-node';\nimport * as winston from 'winston';\nimport { Writable } from 'node:stream';\nimport { stdout } from 'node:process';\n\nexport const convertTechDocsRefToLocationAnnotation = (\n techdocsRef: string,\n): ParsedLocationAnnotation => {\n // Split on the first colon for the protocol and the rest after the first split\n // is the location.\n const [type, target] = techdocsRef.split(/:(.+)/) as [\n RemoteProtocol?,\n string?,\n ];\n\n if (!type || !target) {\n throw new Error(\n `Can not parse --techdocs-ref ${techdocsRef}. Should be of type HOST:URL.`,\n );\n }\n\n return { type, target };\n};\n\nexport const createLogger = ({\n verbose = false,\n}: {\n verbose: boolean;\n}): winston.Logger => {\n const logger = winston.createLogger({\n level: verbose ? 'verbose' : 'info',\n transports: [\n new winston.transports.Console({ format: winston.format.simple() }),\n ],\n });\n\n return logger;\n};\n\nexport const getLogStream = (logger: winston.Logger): Writable => {\n if (process.env.LOG_LEVEL === 'debug') {\n return stdout;\n }\n\n return new Writable({\n defaultEncoding: 'utf8',\n write(chunk, _encoding, next) {\n logger.verbose(chunk.toString().trim());\n next();\n },\n });\n};\n"],"names":["winston","stdout","Writable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,sCAAA,GAAyC,CACpD,WAAA,KAC6B;AAG7B,EAAA,MAAM,CAAC,IAAA,EAAM,MAAM,CAAA,GAAI,WAAA,CAAY,MAAM,OAAO,CAAA;AAKhD,EAAA,IAAI,CAAC,IAAA,IAAQ,CAAC,MAAA,EAAQ;AACpB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,gCAAgC,WAAW,CAAA,6BAAA;AAAA,KAC7C;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,MAAM,MAAA,EAAO;AACxB;AAEO,MAAM,eAAe,CAAC;AAAA,EAC3B,OAAA,GAAU;AACZ,CAAA,KAEsB;AACpB,EAAA,MAAM,MAAA,GAASA,mBAAQ,YAAA,CAAa;AAAA,IAClC,KAAA,EAAO,UAAU,SAAA,GAAY,MAAA;AAAA,IAC7B,UAAA,EAAY;AAAA,MACV,IAAIA,kBAAA,CAAQ,UAAA,CAAW,OAAA,CAAQ,EAAE,QAAQA,kBAAA,CAAQ,MAAA,CAAO,MAAA,EAAO,EAAG;AAAA;AACpE,GACD,CAAA;AAED,EAAA,OAAO,MAAA;AACT;AAEO,MAAM,YAAA,GAAe,CAAC,MAAA,KAAqC;AAChE,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,SAAA,KAAc,OAAA,EAAS;AACrC,IAAA,OAAOC,mBAAA;AAAA,EACT;AAEA,EAAA,OAAO,IAAIC,oBAAA,CAAS;AAAA,IAClB,eAAA,EAAiB,MAAA;AAAA,IACjB,KAAA,CAAM,KAAA,EAAO,SAAA,EAAW,IAAA,EAAM;AAC5B,MAAA,MAAA,CAAO,OAAA,CAAQ,KAAA,CAAM,QAAA,EAAS,CAAE,MAAM,CAAA;AACtC,MAAA,IAAA,EAAK;AAAA,IACP;AAAA,GACD,CAAA;AACH;;;;"}
|
package/dist/package.json.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techdocs/cli",
|
|
3
|
-
"version": "1.12.0",
|
|
3
|
+
"version": "1.12.1-next.0",
|
|
4
4
|
"description": "Utility CLI for managing TechDocs sites in Backstage.",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "cli"
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"watch": "./src"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@backstage/backend-defaults": "
|
|
48
|
-
"@backstage/catalog-model": "
|
|
49
|
-
"@backstage/cli-common": "
|
|
50
|
-
"@backstage/config": "
|
|
51
|
-
"@backstage/plugin-techdocs-node": "
|
|
47
|
+
"@backstage/backend-defaults": "0.18.1-next.0",
|
|
48
|
+
"@backstage/catalog-model": "1.10.2-next.0",
|
|
49
|
+
"@backstage/cli-common": "0.3.2-next.0",
|
|
50
|
+
"@backstage/config": "1.3.10-next.0",
|
|
51
|
+
"@backstage/plugin-techdocs-node": "2.0.1-next.0",
|
|
52
52
|
"commander": "^14.0.3",
|
|
53
53
|
"fs-extra": "^11.0.0",
|
|
54
54
|
"http-proxy": "^1.18.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"winston": "^3.2.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@backstage/cli": "
|
|
61
|
+
"@backstage/cli": "0.36.7-next.0",
|
|
62
62
|
"@types/fs-extra": "^11.0.0",
|
|
63
63
|
"@types/http-proxy": "^1.17.4",
|
|
64
64
|
"@types/node": "^22.13.14",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["123"],{79894(a){a.exports=JSON.parse('{"name":"@backstage/plugin-catalog","version":"2.0.9","description":"The Backstage plugin for browsing the Backstage catalog","backstage":{"role":"frontend-plugin","pluginId":"catalog","pluginPackages":["@backstage/plugin-catalog","@backstage/plugin-catalog-backend","@backstage/plugin-catalog-common","@backstage/plugin-catalog-node","@backstage/plugin-catalog-react"]},"publishConfig":{"access":"public"},"keywords":["backstage"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/catalog"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.ts","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.ts"],"package.json":["package.json"]}},"files":["dist","config.d.ts"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/catalog-client":"workspace:^","@backstage/catalog-model":"workspace:^","@backstage/core-compat-api":"workspace:^","@backstage/core-components":"workspace:^","@backstage/core-plugin-api":"workspace:^","@backstage/errors":"workspace:^","@backstage/frontend-plugin-api":"workspace:^","@backstage/integration-react":"workspace:^","@backstage/plugin-catalog-common":"workspace:^","@backstage/plugin-catalog-react":"workspace:^","@backstage/plugin-permission-react":"workspace:^","@backstage/plugin-scaffolder-common":"workspace:^","@backstage/plugin-search-common":"workspace:^","@backstage/plugin-search-react":"workspace:^","@backstage/plugin-techdocs-common":"workspace:^","@backstage/plugin-techdocs-react":"workspace:^","@backstage/types":"workspace:^","@backstage/ui":"workspace:^","@backstage/version-bridge":"workspace:^","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@mui/utils":"^5.14.15","@remixicon/react":"^4.6.0","classnames":"^2.3.1","csv-stringify":"^5.6.5","dataloader":"^2.0.0","lodash":"^4.17.21","pluralize":"^8.0.0","react-helmet":"6.1.0","react-use":"^17.2.4","zen-observable":"^0.10.0","zod":"^4.0.0"},"devDependencies":{"@backstage/cli":"workspace:^","@backstage/core-app-api":"workspace:^","@backstage/dev-utils":"workspace:^","@backstage/frontend-test-utils":"workspace:^","@backstage/plugin-permission-common":"workspace:^","@backstage/test-utils":"workspace:^","@testing-library/dom":"^10.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/pluralize":"^0.0.33","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2","swr":"^2.2.5"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"configSchema":"config.d.ts"}')}}]);
|
|
2
|
-
//# sourceMappingURL=123.91ba1b809deb.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/123.91ba1b809deb.chunk.js","sources":["webpack://techdocs-cli-embedded-app/json|/home/runner/work/publishing/publishing/plugins/catalog/package.json"],"sourcesContent":["module.exports = JSON.parse('{\"name\":\"@backstage/plugin-catalog\",\"version\":\"2.0.9\",\"description\":\"The Backstage plugin for browsing the Backstage catalog\",\"backstage\":{\"role\":\"frontend-plugin\",\"pluginId\":\"catalog\",\"pluginPackages\":[\"@backstage/plugin-catalog\",\"@backstage/plugin-catalog-backend\",\"@backstage/plugin-catalog-common\",\"@backstage/plugin-catalog-node\",\"@backstage/plugin-catalog-react\"]},\"publishConfig\":{\"access\":\"public\"},\"keywords\":[\"backstage\"],\"homepage\":\"https://backstage.io\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/backstage/backstage\",\"directory\":\"plugins/catalog\"},\"license\":\"Apache-2.0\",\"sideEffects\":false,\"exports\":{\".\":\"./src/index.ts\",\"./alpha\":\"./src/alpha/index.ts\",\"./package.json\":\"./package.json\"},\"main\":\"src/index.ts\",\"types\":\"src/index.ts\",\"typesVersions\":{\"*\":{\"alpha\":[\"src/alpha/index.ts\"],\"package.json\":[\"package.json\"]}},\"files\":[\"dist\",\"config.d.ts\"],\"scripts\":{\"build\":\"backstage-cli package build\",\"clean\":\"backstage-cli package clean\",\"lint\":\"backstage-cli package lint\",\"prepack\":\"backstage-cli package prepack\",\"postpack\":\"backstage-cli package postpack\",\"start\":\"backstage-cli package start\",\"test\":\"backstage-cli package test\"},\"dependencies\":{\"@backstage/catalog-client\":\"workspace:^\",\"@backstage/catalog-model\":\"workspace:^\",\"@backstage/core-compat-api\":\"workspace:^\",\"@backstage/core-components\":\"workspace:^\",\"@backstage/core-plugin-api\":\"workspace:^\",\"@backstage/errors\":\"workspace:^\",\"@backstage/frontend-plugin-api\":\"workspace:^\",\"@backstage/integration-react\":\"workspace:^\",\"@backstage/plugin-catalog-common\":\"workspace:^\",\"@backstage/plugin-catalog-react\":\"workspace:^\",\"@backstage/plugin-permission-react\":\"workspace:^\",\"@backstage/plugin-scaffolder-common\":\"workspace:^\",\"@backstage/plugin-search-common\":\"workspace:^\",\"@backstage/plugin-search-react\":\"workspace:^\",\"@backstage/plugin-techdocs-common\":\"workspace:^\",\"@backstage/plugin-techdocs-react\":\"workspace:^\",\"@backstage/types\":\"workspace:^\",\"@backstage/ui\":\"workspace:^\",\"@backstage/version-bridge\":\"workspace:^\",\"@material-ui/core\":\"^4.12.2\",\"@material-ui/icons\":\"^4.9.1\",\"@material-ui/lab\":\"4.0.0-alpha.61\",\"@mui/utils\":\"^5.14.15\",\"@remixicon/react\":\"^4.6.0\",\"classnames\":\"^2.3.1\",\"csv-stringify\":\"^5.6.5\",\"dataloader\":\"^2.0.0\",\"lodash\":\"^4.17.21\",\"pluralize\":\"^8.0.0\",\"react-helmet\":\"6.1.0\",\"react-use\":\"^17.2.4\",\"zen-observable\":\"^0.10.0\",\"zod\":\"^4.0.0\"},\"devDependencies\":{\"@backstage/cli\":\"workspace:^\",\"@backstage/core-app-api\":\"workspace:^\",\"@backstage/dev-utils\":\"workspace:^\",\"@backstage/frontend-test-utils\":\"workspace:^\",\"@backstage/plugin-permission-common\":\"workspace:^\",\"@backstage/test-utils\":\"workspace:^\",\"@testing-library/dom\":\"^10.0.0\",\"@testing-library/jest-dom\":\"^6.0.0\",\"@testing-library/react\":\"^16.0.0\",\"@testing-library/user-event\":\"^14.0.0\",\"@types/pluralize\":\"^0.0.33\",\"@types/react\":\"^18.0.0\",\"react\":\"^18.0.2\",\"react-dom\":\"^18.0.2\",\"react-router-dom\":\"^6.30.2\",\"swr\":\"^2.2.5\"},\"peerDependencies\":{\"@types/react\":\"^17.0.0 || ^18.0.0\",\"react\":\"^17.0.0 || ^18.0.0\",\"react-dom\":\"^17.0.0 || ^18.0.0\",\"react-router-dom\":\"^6.30.2\"},\"peerDependenciesMeta\":{\"@types/react\":{\"optional\":true}},\"configSchema\":\"config.d.ts\"}')"],"names":["JSON"],"mappings":"iIAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,0kG"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1659"],{23494(e){e.exports=JSON.parse('{"name":"@backstage/plugin-techdocs","version":"1.18.1","description":"The Backstage plugin that renders technical documentation for your components","backstage":{"role":"frontend-plugin","pluginId":"techdocs","pluginPackages":["@backstage/plugin-techdocs","@backstage/plugin-techdocs-backend","@backstage/plugin-techdocs-common","@backstage/plugin-techdocs-node","@backstage/plugin-techdocs-react"]},"publishConfig":{"access":"public"},"keywords":["backstage","techdocs"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/techdocs"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.tsx","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.tsx"],"package.json":["package.json"]}},"files":["dist","config.d.ts"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/catalog-client":"workspace:^","@backstage/catalog-model":"workspace:^","@backstage/config":"workspace:^","@backstage/core-components":"workspace:^","@backstage/core-plugin-api":"workspace:^","@backstage/errors":"workspace:^","@backstage/frontend-plugin-api":"workspace:^","@backstage/integration":"workspace:^","@backstage/integration-react":"workspace:^","@backstage/plugin-auth-react":"workspace:^","@backstage/plugin-catalog-react":"workspace:^","@backstage/plugin-search-common":"workspace:^","@backstage/plugin-search-react":"workspace:^","@backstage/plugin-techdocs-common":"workspace:^","@backstage/plugin-techdocs-react":"workspace:^","@backstage/theme":"workspace:^","@backstage/ui":"workspace:^","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@material-ui/styles":"^4.10.0","@microsoft/fetch-event-source":"^2.0.1","@remixicon/react":">=4.6.0 <4.9.0","dompurify":"^3.4.12","git-url-parse":"^15.0.0","lodash":"^4.17.21","react-helmet":"6.1.0","react-use":"^17.2.4","zod":"^4.0.0"},"devDependencies":{"@backstage/cli":"workspace:^","@backstage/core-app-api":"workspace:^","@backstage/dev-utils":"workspace:^","@backstage/plugin-catalog":"workspace:^","@backstage/plugin-techdocs-module-addons-contrib":"workspace:^","@backstage/test-utils":"workspace:^","@testing-library/dom":"^10.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/dompurify":"^3.0.0","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"configSchema":"config.d.ts"}')}}]);
|
|
2
|
-
//# sourceMappingURL=1659.a99e4eb674e0.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/1659.a99e4eb674e0.chunk.js","sources":["webpack://techdocs-cli-embedded-app/json|/home/runner/work/publishing/publishing/plugins/techdocs/package.json"],"sourcesContent":["module.exports = JSON.parse('{\"name\":\"@backstage/plugin-techdocs\",\"version\":\"1.18.1\",\"description\":\"The Backstage plugin that renders technical documentation for your components\",\"backstage\":{\"role\":\"frontend-plugin\",\"pluginId\":\"techdocs\",\"pluginPackages\":[\"@backstage/plugin-techdocs\",\"@backstage/plugin-techdocs-backend\",\"@backstage/plugin-techdocs-common\",\"@backstage/plugin-techdocs-node\",\"@backstage/plugin-techdocs-react\"]},\"publishConfig\":{\"access\":\"public\"},\"keywords\":[\"backstage\",\"techdocs\"],\"homepage\":\"https://backstage.io\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/backstage/backstage\",\"directory\":\"plugins/techdocs\"},\"license\":\"Apache-2.0\",\"sideEffects\":false,\"exports\":{\".\":\"./src/index.ts\",\"./alpha\":\"./src/alpha/index.tsx\",\"./package.json\":\"./package.json\"},\"main\":\"src/index.ts\",\"types\":\"src/index.ts\",\"typesVersions\":{\"*\":{\"alpha\":[\"src/alpha/index.tsx\"],\"package.json\":[\"package.json\"]}},\"files\":[\"dist\",\"config.d.ts\"],\"scripts\":{\"build\":\"backstage-cli package build\",\"clean\":\"backstage-cli package clean\",\"lint\":\"backstage-cli package lint\",\"prepack\":\"backstage-cli package prepack\",\"postpack\":\"backstage-cli package postpack\",\"start\":\"backstage-cli package start\",\"test\":\"backstage-cli package test\"},\"dependencies\":{\"@backstage/catalog-client\":\"workspace:^\",\"@backstage/catalog-model\":\"workspace:^\",\"@backstage/config\":\"workspace:^\",\"@backstage/core-components\":\"workspace:^\",\"@backstage/core-plugin-api\":\"workspace:^\",\"@backstage/errors\":\"workspace:^\",\"@backstage/frontend-plugin-api\":\"workspace:^\",\"@backstage/integration\":\"workspace:^\",\"@backstage/integration-react\":\"workspace:^\",\"@backstage/plugin-auth-react\":\"workspace:^\",\"@backstage/plugin-catalog-react\":\"workspace:^\",\"@backstage/plugin-search-common\":\"workspace:^\",\"@backstage/plugin-search-react\":\"workspace:^\",\"@backstage/plugin-techdocs-common\":\"workspace:^\",\"@backstage/plugin-techdocs-react\":\"workspace:^\",\"@backstage/theme\":\"workspace:^\",\"@backstage/ui\":\"workspace:^\",\"@material-ui/core\":\"^4.12.2\",\"@material-ui/icons\":\"^4.9.1\",\"@material-ui/lab\":\"4.0.0-alpha.61\",\"@material-ui/styles\":\"^4.10.0\",\"@microsoft/fetch-event-source\":\"^2.0.1\",\"@remixicon/react\":\">=4.6.0 <4.9.0\",\"dompurify\":\"^3.4.12\",\"git-url-parse\":\"^15.0.0\",\"lodash\":\"^4.17.21\",\"react-helmet\":\"6.1.0\",\"react-use\":\"^17.2.4\",\"zod\":\"^4.0.0\"},\"devDependencies\":{\"@backstage/cli\":\"workspace:^\",\"@backstage/core-app-api\":\"workspace:^\",\"@backstage/dev-utils\":\"workspace:^\",\"@backstage/plugin-catalog\":\"workspace:^\",\"@backstage/plugin-techdocs-module-addons-contrib\":\"workspace:^\",\"@backstage/test-utils\":\"workspace:^\",\"@testing-library/dom\":\"^10.0.0\",\"@testing-library/jest-dom\":\"^6.0.0\",\"@testing-library/react\":\"^16.0.0\",\"@testing-library/user-event\":\"^14.0.0\",\"@types/dompurify\":\"^3.0.0\",\"@types/react\":\"^18.0.0\",\"react\":\"^18.0.2\",\"react-dom\":\"^18.0.2\",\"react-router-dom\":\"^6.30.2\"},\"peerDependencies\":{\"@types/react\":\"^17.0.0 || ^18.0.0\",\"react\":\"^17.0.0 || ^18.0.0\",\"react-dom\":\"^17.0.0 || ^18.0.0\",\"react-router-dom\":\"^6.30.2\"},\"peerDependenciesMeta\":{\"@types/react\":{\"optional\":true}},\"configSchema\":\"config.d.ts\"}')"],"names":["JSON"],"mappings":"kIAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,2+F"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1767"],{12326(e,t,i){"use strict";var n=i(4293),r=i(78920);t.default=void 0;var s=r(i(14041));t.default=(0,n(i(74044)).default)(s.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp")},44187(e){e.exports=function(e,t,i,n){var r=-1,s=null==e?0:e.length;for(n&&s&&(i=e[++r]);++r<s;)i=t(i,e[r],r,e);return i}},39546(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},51035(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},93640(e,t,i){var n=i(44187),r=i(45881),s=i(17469),a=RegExp("['’]","g");e.exports=function(e){return function(t){return n(s(r(t).replace(a,"")),e,"")}}},69968(e,t,i){e.exports=i(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",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Oe",œ:"oe",ʼn:"'n",ſ:"s"})},15813(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},10482(e){var t="\\ud800-\\udfff",i="\\u2700-\\u27bf",n="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="['’]",o="["+s+"]",l="["+n+"]",u="[^"+t+s+"\\d+"+i+n+r+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+r+"]",g="(?:"+l+"|"+u+")",f="(?:"+h+"|"+u+")",p="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",m="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",_="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",E="[\\ufe0e\\ufe0f]?",y="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+E+_+")*",b="(?:"+["["+i+"]",c,d].join("|")+")"+(E+_+y),T=RegExp([h+"?"+l+"+"+p+"(?="+[o,h,"$"].join("|")+")",f+"+"+m+"(?="+[o,h+g,"$"].join("|")+")",h+"?"+g+"+"+p,h+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",b].join("|"),"g");e.exports=function(e){return e.match(T)||[]}},45881(e,t,i){var n=i(69968),r=i(95243),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=r(e))&&e.replace(s,n).replace(a,"")}},95479(e,t,i){var n=i(93640),r=i(5485);e.exports=n(function(e,t,i){return e+(i?" ":"")+r(t)})},17469(e,t,i){var n=i(39546),r=i(15813),s=i(95243),a=i(10482);e.exports=function(e,t,i){return(e=s(e),void 0===(t=i?void 0:t))?r(e)?a(e):n(e):e.match(t)||[]}},19686(e,t,i){"use strict";let n;i.d(t,{Ay:()=>d});var r=i(14041);n="u">typeof window?window:"u">typeof self?self:i.g;let s=null,a=null,o=n.clearTimeout,l=n.setTimeout,u=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame,c=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame;null==u||null==c?(s=o,a=function(e){return l(e,20)}):(s=function([e,t]){u(e),o(t)},a=function(e){let t=c(function(){o(i),e()}),i=l(function(){u(t),e()},20);return[t,i]});class d extends r.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;let{disableHeight:e,disableWidth:t,onResize:i}=this.props;if(this._parentNode){let n=window.getComputedStyle(this._parentNode)||{},r=parseFloat(n.paddingLeft||"0"),s=parseFloat(n.paddingRight||"0"),a=parseFloat(n.paddingTop||"0"),o=parseFloat(n.paddingBottom||"0"),l=this._parentNode.getBoundingClientRect(),u=l.height-a-o,c=l.width-r-s;if(!e&&this.state.height!==u||!t&&this.state.width!==c){this.setState({height:u,width:c});let e=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"))};"function"==typeof i&&i({height:u,width:c,get scaledHeight(){return e(),u},get scaledWidth(){return e(),c}})}}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){let{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(null!=t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;let i=t.ownerDocument.defaultView.ResizeObserver;null!=i?(this._resizeObserver=new i(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(t)):(this._detectElementResize=function(e){let t,i,r,o,l,u,c="u">typeof document&&document.attachEvent;if(!c){l=function(e){let t=e.__resizeTriggers__,i=t.firstElementChild,n=t.lastElementChild,r=i.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,r.style.width=i.offsetWidth+1+"px",r.style.height=i.offsetHeight+1+"px",i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight},u=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&0>e.target.className.indexOf("contract-trigger")&&0>e.target.className.indexOf("expand-trigger"))return;let t=this;l(this),this.__resizeRAF__&&s(this.__resizeRAF__),this.__resizeRAF__=a(function(){(t.offsetWidth!==t.__resizeLast__.width||t.offsetHeight!==t.__resizeLast__.height)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(i){i.call(t,e)}))})};let e=!1,n="";r="animationstart";let c="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" ");{let t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e){for(let i=0;i<c.length;i++)if(void 0!==t.style[c[i]+"AnimationName"]){n="-"+c[i].toLowerCase()+"-",r=d[i],e=!0;break}}}t="@"+n+"keyframes "+(i="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",o=n+"animation: 1ms "+i+"; "}let d=function(i){if(!i.getElementById("detectElementResize")){let n=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=i.head||i.getElementsByTagName("head")[0],s=i.createElement("style");s.id="detectElementResize",s.type="text/css",null!=e&&s.setAttribute("nonce",e),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(i.createTextNode(n)),r.appendChild(s)}};return{addResizeListener:function(e,t){if(c)e.attachEvent("onresize",t);else{if(!e.__resizeTriggers__){let t=e.ownerDocument,s=n.getComputedStyle(e);s&&"static"===s.position&&(e.style.position="relative"),d(t),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=t.createElement("div")).className="resize-triggers";let a=t.createElement("div");a.className="expand-trigger",a.appendChild(t.createElement("div"));let o=t.createElement("div");o.className="contract-trigger",e.__resizeTriggers__.appendChild(a),e.__resizeTriggers__.appendChild(o),e.appendChild(e.__resizeTriggers__),l(e),e.addEventListener("scroll",u,!0),r&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName===i&&l(e)},e.__resizeTriggers__.addEventListener(r,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(t)}},removeResizeListener:function(e,t){if(c)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",u,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){let{children:e,defaultHeight:t,defaultWidth:i,disableHeight:n=!1,disableWidth:s=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:o,onResize:l,style:u={},tagName:c="div",...d}=this.props,{height:h,width:g}=this.state,f={overflow:"visible"},p={},m=!1;return n||(0===h&&(m=!0),f.height=0,p.height=h,p.scaledHeight=h),s||(0===g&&(m=!0),f.width=0,p.width=g,p.scaledWidth=g),a&&(m=!1),(0,r.createElement)(c,{ref:this._setRef,style:{...f,...u},...d},!m&&e(p))}}},54633(e,t,i){"use strict";i.d(t,{e:()=>s});var n=i(14041),r=i(16261);function s(e=!1,t=!0){let[i,a]=(0,n.useState)(e),o=(0,r.J)(t);return[i,(0,n.useCallback)(e=>{a(t=>void 0===e||o.current&&"object"==typeof e&&("SyntheticBaseEvent"===e.constructor.name||"string"==typeof e._reactName)?!t:"function"==typeof e?!!e(t):!!e)},[])]}},84774(e,t,i){"use strict";function n({onlyFirst:e=!1}={}){return RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}i.d(t,{A:()=>n})},60075(e,t,i){"use strict";i.d(t,{A:()=>ej});var n=i(14041);let r="numeric",s="ascii",a="alpha",o="asciinumeric",l="alphanumeric",u="domain",c="emoji",d="whitespace";function h(e,t,i){for(let n in t[r]&&(t[o]=!0,t[l]=!0),t[s]&&(t[o]=!0,t[a]=!0),t[o]&&(t[l]=!0),t[a]&&(t[l]=!0),t[l]&&(t[u]=!0),t[c]&&(t[u]=!0),t){let t=(n in i||(i[n]=[]),i[n]);0>t.indexOf(e)&&t.push(e)}}function g(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}g.groups={},g.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let i=this.jr[t][0],n=this.jr[t][1];if(n&&i.test(e))return n}return this.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,i,n){for(let r=0;r<e.length;r++)this.tt(e[r],t,i,n)},tr(e,t,i,n){let r;return n=n||g.groups,t&&t.j?r=t:(r=new g(t),i&&n&&h(t,i,n)),this.jr.push([e,r]),r},ts(e,t,i,n){let r=this,s=e.length;if(!s)return r;for(let t=0;t<s-1;t++)r=r.tt(e[t]);return r.tt(e[s-1],t,i,n)},tt(e,t,i,n){if(n=n||g.groups,t&&t.j)return this.j[e]=t,t;let r,s=this.go(e);return s?(Object.assign((r=new g).j,s.j),r.jr.push.apply(r.jr,s.jr),r.jd=s.jd,r.t=s.t):r=new g,t&&(n&&(r.t&&"string"==typeof r.t?h(t,Object.assign(function(e,t){let i={};for(let n in t)t[n].indexOf(e)>=0&&(i[n]=!0);return i}(r.t,n),i),n):i&&h(t,i,n)),r.t=t),this.j[e]=r,r}};let f=(e,t,i,n,r)=>e.ta(t,i,n,r),p=(e,t,i,n,r)=>e.tr(t,i,n,r),m=(e,t,i,n,r)=>e.ts(t,i,n,r),_=(e,t,i,n,r)=>e.tt(t,i,n,r),E="WORD",y="UWORD",b="ASCIINUMERICAL",T="ALPHANUMERICAL",L="LOCALHOST",k="UTLD",A="SCHEME",v="SLASH_SCHEME",R="OPENBRACE",x="CLOSEBRACE",z="OPENBRACKET",O="CLOSEBRACKET",C="OPENPAREN",N="CLOSEPAREN",S="OPENANGLEBRACKET",w="CLOSEANGLEBRACKET",H="FULLWIDTHLEFTPAREN",I="FULLWIDTHRIGHTPAREN",j="LEFTCORNERBRACKET",D="RIGHTCORNERBRACKET",U="LEFTWHITECORNERBRACKET",P="RIGHTWHITECORNERBRACKET",M="FULLWIDTHLESSTHAN",W="FULLWIDTHGREATERTHAN",F="AMPERSAND",B="APOSTROPHE",K="ASTERISK",G="BACKSLASH",q="BACKTICK",Q="CARET",Y="COLON",Z="COMMA",$="DOLLAR",V="EQUALS",J="EXCLAMATION",X="HYPHEN",ee="PERCENT",et="PIPE",ei="PLUS",en="POUND",er="QUERY",es="QUOTE",ea="FULLWIDTHMIDDLEDOT",eo="SEMI",el="SLASH",eu="TILDE",ec="UNDERSCORE",ed="EMOJI";var eh=Object.freeze({__proto__:null,ALPHANUMERICAL:T,AMPERSAND:F,APOSTROPHE:B,ASCIINUMERICAL:b,ASTERISK:K,AT:"AT",BACKSLASH:G,BACKTICK:q,CARET:Q,CLOSEANGLEBRACKET:w,CLOSEBRACE:x,CLOSEBRACKET:O,CLOSEPAREN:N,COLON:Y,COMMA:Z,DOLLAR:$,DOT:"DOT",EMOJI:ed,EQUALS:V,EXCLAMATION:J,FULLWIDTHGREATERTHAN:W,FULLWIDTHLEFTPAREN:H,FULLWIDTHLESSTHAN:M,FULLWIDTHMIDDLEDOT:ea,FULLWIDTHRIGHTPAREN:I,HYPHEN:X,LEFTCORNERBRACKET:j,LEFTWHITECORNERBRACKET:U,LOCALHOST:L,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:S,OPENBRACE:R,OPENBRACKET:z,OPENPAREN:C,PERCENT:ee,PIPE:et,PLUS:ei,POUND:en,QUERY:er,QUOTE:es,RIGHTCORNERBRACKET:D,RIGHTWHITECORNERBRACKET:P,SCHEME:A,SEMI:eo,SLASH:el,SLASH_SCHEME:v,SYM:"SYM",TILDE:eu,TLD:"TLD",UNDERSCORE:ec,UTLD:k,UWORD:y,WORD:E,WS:"WS"});let eg=/[a-z]/,ef=/\p{L}/u,ep=/\p{Emoji}/u,em=/\d/,e_=/\s/,eE=null,ey=null;function eb(e,t){let i=function(e){let t=[],i=e.length,n=0;for(;n<i;){let r,s=e.charCodeAt(n),a=s<55296||s>56319||n+1===i||(r=e.charCodeAt(n+1))<56320||r>57343?e[n]:e.slice(n,n+2);t.push(a),n+=a.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),n=i.length,r=[],s=0,a=0;for(;a<n;){let o=e,l=null,u=0,c=null,d=-1,h=-1;for(;a<n&&(l=o.go(i[a]));)(o=l).accepts()?(d=0,h=0,c=o):d>=0&&(d+=i[a].length,h++),u+=i[a].length,s+=i[a].length,a++;s-=d,a-=h,u-=d,r.push({t:c.t,v:t.slice(s-u,s),s:s-u,e:s})}return r}function eT(e,t,i,n,r){let s,a=t.length;for(let i=0;i<a-1;i++){let a=t[i];e.j[a]?s=e.j[a]:((s=new g(n)).jr=r.slice(),e.j[a]=s),e=s}return(s=new g(i)).jr=r.slice(),e.j[t[a-1]]=s,s}function eL(e){let t=[],i=[],n=0;for(;n<e.length;){let r=0;for(;"0123456789".indexOf(e[n+r])>=0;)r++;if(r>0){t.push(i.join(""));for(let t=parseInt(e.substring(n,n+r),10);t>0;t--)i.pop();n+=r}else i.push(e[n]),n++}return t}let ek={defaultProtocol:"http",events:null,format:ev,formatHref:ev,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eA(e,t=null){let i=Object.assign({},ek);e&&(i=Object.assign(i,e instanceof eA?e.o:e));let n=i.ignoreTags,r=[];for(let e=0;e<n.length;e++)r.push(n[e].toUpperCase());this.o=i,t&&(this.defaultRender=t),this.ignoreTags=r}function ev(e){return e}function eR(e,t){this.t="token",this.v=e,this.tk=t}function ex(e,t){class i extends eR{constructor(t,i){super(t,i),this.t=e}}for(let e in t)i.prototype[e]=t[e];return i.t=e,i}eA.prototype={o:ek,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,i){let n=null!=t,r=this.o[e];return r&&("object"==typeof r?"function"==typeof(r=i.t in r?r[i.t]:ek[e])&&n&&(r=r(t,i)):"function"==typeof r&&n&&(r=r(t,i.t,i))),r},getObj(e,t,i){let n=this.o[e];return"function"==typeof n&&null!=t&&(n=n(t,i.t,i)),n},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eR.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),i=e.get("truncate",t,this),n=e.get("format",t,this);return i&&n.length>i?n.substring(0,i)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=ek.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),i=e.get("formatHref",t,this),n=e.get("tagName",t,this),r=this.toFormattedString(e),s={},a=e.get("className",t,this),o=e.get("target",t,this),l=e.get("rel",t,this),u=e.getObj("attributes",t,this),c=e.getObj("events",t,this);return s.href=i,a&&(s.class=a),o&&(s.target=o),l&&(s.rel=l),u&&Object.assign(s,u),{tagName:n,attributes:s,content:r,eventListeners:c}}};let ez=ex("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eO=ex("text"),eC=ex("nl"),eN=ex("url",{isLink:!0,toHref(e=ek.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==L&&e[1].t===Y}}),eS=e=>new g(e);function ew(e,t,i){let n=i[0].s,r=i[i.length-1].e;return new e(t.slice(n,r),i)}let eH={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function eI(e){return eH.initialized||function(){eH.scanner=function(e=[]){let t={};g.groups=t;let i=new g;null==eE&&(eE=eL("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==ey&&(ey=eL("ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2")),_(i,"'",B),_(i,"{",R),_(i,"}",x),_(i,"[",z),_(i,"]",O),_(i,"(",C),_(i,")",N),_(i,"<",S),_(i,">",w),_(i,"(",H),_(i,")",I),_(i,"「",j),_(i,"」",D),_(i,"『",U),_(i,"』",P),_(i,"<",M),_(i,">",W),_(i,"&",F),_(i,"*",K),_(i,"@","AT"),_(i,"`",q),_(i,"^",Q),_(i,":",Y),_(i,",",Z),_(i,"$",$),_(i,".","DOT"),_(i,"=",V),_(i,"!",J),_(i,"-",X),_(i,"%",ee),_(i,"|",et),_(i,"+",ei),_(i,"#",en),_(i,"?",er),_(i,'"',es),_(i,"/",el),_(i,";",eo),_(i,"~",eu),_(i,"_",ec),_(i,"\\",G),_(i,"・",ea);let n=p(i,em,"NUM",{[r]:!0});p(n,em,n);let f=p(n,eg,b,{[o]:!0}),eb=p(n,ef,T,{[l]:!0}),ek=p(i,eg,E,{[s]:!0});p(ek,em,f),p(ek,eg,ek),p(f,em,f),p(f,eg,f);let eA=p(i,ef,y,{[a]:!0});p(eA,eg),p(eA,em,eb),p(eA,ef,eA),p(eb,em,eb),p(eb,eg),p(eb,ef,eb);let ev=_(i,"\n","NL",{[d]:!0}),eR=_(i,"\r","WS",{[d]:!0}),ex=p(i,e_,"WS",{[d]:!0});_(i,"",ex),_(eR,"\n",ev),_(eR,"",ex),p(eR,e_,ex),_(ex,"\r"),_(ex,"\n"),p(ex,e_,ex),_(ex,"",ex);let ez=p(i,ep,ed,{[c]:!0});_(ez,"#"),p(ez,ep,ez),_(ez,"️",ez);let eO=_(ez,"");_(eO,"#"),p(eO,ep,ez);let eC=[[eg,ek],[em,f]],eN=[[eg,null],[ef,eA],[em,eb]];for(let e=0;e<eE.length;e++)eT(i,eE[e],"TLD",E,eC);for(let e=0;e<ey.length;e++)eT(i,ey[e],k,y,eN);h("TLD",{tld:!0,ascii:!0},t),h(k,{utld:!0,alpha:!0},t),eT(i,"file",A,E,eC),eT(i,"mailto",A,E,eC),eT(i,"http",v,E,eC),eT(i,"https",v,E,eC),eT(i,"ftp",v,E,eC),eT(i,"ftps",v,E,eC),h(A,{scheme:!0,ascii:!0},t),h(v,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let n=e[t][0],a=e[t][1]?{scheme:!0}:{slashscheme:!0};n.indexOf("-")>=0?a[u]=!0:eg.test(n)?em.test(n)?a[o]=!0:a[s]=!0:a[r]=!0,m(i,n,n,a)}return m(i,"localhost",L,{ascii:!0}),i.jd=new g("SYM"),{start:i,tokens:Object.assign({groups:t},eh)}}(eH.customSchemes);for(let e=0;e<eH.tokenQueue.length;e++)eH.tokenQueue[e][1]({scanner:eH.scanner});eH.parser=function({groups:e}){let t=e.domain.concat([F,K,"AT",G,q,Q,$,V,X,"NUM",ee,et,ei,en,el,"SYM",eu,ec]),i=[B,Y,Z,"DOT",J,ee,er,es,eo,S,w,R,x,O,z,C,N,H,I,j,D,U,P,M,W],n=[F,B,K,G,q,Q,$,V,X,R,x,ee,et,ei,en,er,el,"SYM",eu,ec],r=eS(),s=_(r,eu);f(s,n,s),f(s,e.domain,s);let a=eS(),o=eS(),l=eS();f(r,e.domain,a),f(r,e.scheme,o),f(r,e.slashscheme,l),f(a,n,s),f(a,e.domain,a);let u=_(a,"AT");_(s,"AT",u),_(o,"AT",u),_(l,"AT",u);let c=_(s,"DOT");f(c,n,s),f(c,e.domain,s);let d=eS();f(u,e.domain,d),f(d,e.domain,d);let h=_(d,"DOT");f(h,e.domain,d);let g=eS(ez);f(h,e.tld,g),f(h,e.utld,g),_(u,L,g);let p=_(d,X);_(p,X,p),f(p,e.domain,d),f(g,e.domain,d),_(g,"DOT",h),_(g,X,p),f(_(g,Y),e.numeric,ez);let m=_(a,X),E=_(a,"DOT");_(m,X,m),f(m,e.domain,a),f(E,n,s),f(E,e.domain,a);let y=eS(eN);f(E,e.tld,y),f(E,e.utld,y),f(y,e.domain,a),f(y,n,s),_(y,"DOT",E),_(y,X,m),_(y,"AT",u);let b=_(y,Y),T=eS(eN);f(b,e.numeric,T);let k=eS(eN),A=eS();f(k,t,k),f(k,i,A),f(A,t,k),f(A,i,A),_(y,el,k),_(T,el,k);let v=_(o,Y),ea=_(l,Y),ed=_(ea,el),eg=_(ed,el);f(o,e.domain,a),_(o,"DOT",E),_(o,X,m),f(l,e.domain,a),_(l,"DOT",E),_(l,X,m),f(v,e.domain,k),_(v,el,k),_(v,er,k),f(eg,e.domain,k),f(eg,t,k),_(eg,el,k);let ef=[[R,x],[z,O],[C,N],[S,w],[H,I],[j,D],[U,P],[M,W]];for(let e=0;e<ef.length;e++){let[n,r]=ef[e],s=_(k,n);_(A,n,s),_(s,r,k);let a=eS(eN);f(s,t,a);let o=eS();f(s,i),f(a,t,a),f(a,i,o),f(o,t,a),f(o,i,o),_(a,r,k),_(o,r,k)}return _(r,L,y),_(r,"NL",eC),{start:r,tokens:eh}}(eH.scanner.tokens);for(let e=0;e<eH.pluginQueue.length;e++)eH.pluginQueue[e][1]({scanner:eH.scanner,parser:eH.parser});eH.initialized=!0}(),function(e,t,i){let n=i.length,r=0,s=[],a=[];for(;r<n;){let o=e,l=null,u=null,c=0,d=null,h=-1;for(;r<n&&!(l=o.go(i[r].t));)a.push(i[r++]);for(;r<n&&(u=l||o.go(i[r].t));)l=null,(o=u).accepts()?(h=0,d=o):h>=0&&h++,r++,c++;if(h<0)(r-=c)<n&&(a.push(i[r]),r++);else{a.length>0&&(s.push(ew(eO,t,a)),a=[]),r-=h,c-=h;let e=d.t,n=i.slice(r-c,r);s.push(ew(e,t,n))}}return a.length>0&&s.push(ew(eO,t,a)),s}(eH.parser.start,e,eb(eH.scanner.start,e))}eI.scan=eb;let ej=e=>{let t=0,i={key:"__linkify-wrapper"};for(let t in e)"options"!==t&&"as"!==t&&"tagName"!==t&&"children"!==t&&(i[t]=e[t]);let r=new eA(e.options,({tagName:e,attributes:i,content:r})=>(i.key=`__linkify-lnk-${t++}`,i.class&&(i.className=i.class,delete i.class),n.createElement(e,i,r))),s=e.as||e.tagName||n.Fragment||"span",a=e.children;return function e(t,i,r){if(0===n.Children.count(t.props.children))return t;let s=[];n.Children.forEach(t.props.children,t=>{"string"==typeof t?s.push.apply(s,function(e,t,i){let r=eI(e),s=[];for(let e=0;e<r.length;e++){let a=r[e];if("nl"===a.t&&t.get("nl2br")){let e=`__linkify-el-${i.elementId++}`;s.push(n.createElement("br",{key:e}))}else if(a.isLink&&t.check(a)){let e=t.render(a);if(!("key"in e.props)){let t=Object.assign({key:`__linkify-el-${i.elementId++}`},e.props);e=n.cloneElement(e,t)}s.push(e)}else s.push(a.toString())}return s}(t,i,r)):n.isValidElement(t)?"string"==typeof t.type&&i.ignoreTags.indexOf(t.type.toUpperCase())>=0?s.push(t):s.push(e(t,i,r)):s.push(t)});let a=Object.assign({key:`__linkify-el-${r.elementId++}`},t.props);return n.cloneElement(t,a,s)}(n.createElement(s,i,a),r,{elementId:0})}}}]);
|
|
2
|
-
//# sourceMappingURL=1767.5aca18e1057b.chunk.js.map
|