@grest-ts/common 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +81 -0
- package/dist/src/GGAsyncStorage.d.ts +12 -0
- package/dist/src/GGAsyncStorage.d.ts.map +1 -0
- package/dist/src/GGAsyncStorage.js +20 -0
- package/dist/src/GGAsyncStorage.js.map +1 -0
- package/dist/src/GGError.d.ts +32 -0
- package/dist/src/GGError.d.ts.map +1 -0
- package/dist/src/GGError.js +47 -0
- package/dist/src/GGError.js.map +1 -0
- package/dist/src/GGExtensionDiscovery.d.ts +54 -0
- package/dist/src/GGExtensionDiscovery.d.ts.map +1 -0
- package/dist/src/GGExtensionDiscovery.js +281 -0
- package/dist/src/GGExtensionDiscovery.js.map +1 -0
- package/dist/src/Secret.d.ts +46 -0
- package/dist/src/Secret.d.ts.map +1 -0
- package/dist/src/Secret.js +68 -0
- package/dist/src/Secret.js.map +1 -0
- package/dist/src/UnreachableCode.d.ts +5 -0
- package/dist/src/UnreachableCode.d.ts.map +1 -0
- package/dist/src/UnreachableCode.js +9 -0
- package/dist/src/UnreachableCode.js.map +1 -0
- package/dist/src/deepClone.d.ts +6 -0
- package/dist/src/deepClone.d.ts.map +1 -0
- package/dist/src/deepClone.js +38 -0
- package/dist/src/deepClone.js.map +1 -0
- package/dist/src/deepFreeze.d.ts +6 -0
- package/dist/src/deepFreeze.d.ts.map +1 -0
- package/dist/src/deepFreeze.js +22 -0
- package/dist/src/deepFreeze.js.map +1 -0
- package/dist/src/environment.d.ts +14 -0
- package/dist/src/environment.d.ts.map +1 -0
- package/dist/src/environment.js +18 -0
- package/dist/src/environment.js.map +1 -0
- package/dist/src/http.d.ts +50 -0
- package/dist/src/http.d.ts.map +1 -0
- package/dist/src/http.js +50 -0
- package/dist/src/http.js.map +1 -0
- package/dist/src/index-browser.d.ts +12 -0
- package/dist/src/index-browser.d.ts.map +1 -0
- package/dist/src/index-browser.js +13 -0
- package/dist/src/index-browser.js.map +1 -0
- package/dist/src/index-node.d.ts +13 -0
- package/dist/src/index-node.d.ts.map +1 -0
- package/dist/src/index-node.js +13 -0
- package/dist/src/index-node.js.map +1 -0
- package/dist/src/sleep.d.ts +2 -0
- package/dist/src/sleep.d.ts.map +1 -0
- package/dist/src/sleep.js +4 -0
- package/dist/src/sleep.js.map +1 -0
- package/dist/src/tsconfig.json +17 -0
- package/dist/src/types.d.ts +15 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/withTimeout.d.ts +11 -0
- package/dist/src/withTimeout.d.ts.map +1 -0
- package/dist/src/withTimeout.js +22 -0
- package/dist/src/withTimeout.js.map +1 -0
- package/dist/tsconfig.publish.tsbuildinfo +1 -0
- package/package.json +58 -0
- package/src/GGAsyncStorage.ts +27 -0
- package/src/GGError.ts +74 -0
- package/src/GGExtensionDiscovery.ts +314 -0
- package/src/Secret.ts +76 -0
- package/src/UnreachableCode.ts +9 -0
- package/src/deepClone.ts +43 -0
- package/src/deepFreeze.ts +21 -0
- package/src/environment.ts +22 -0
- package/src/http.ts +52 -0
- package/src/index-browser.ts +12 -0
- package/src/index-node.ts +12 -0
- package/src/sleep.ts +3 -0
- package/src/tsconfig.json +17 -0
- package/src/types.ts +16 -0
- package/src/withTimeout.ts +20 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/ggasyncstorage.ts","../src/ggerror.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@nodelib/fs.stat/out/types/index.d.ts","../../../node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts","../../../node_modules/@nodelib/fs.stat/out/settings.d.ts","../../../node_modules/@nodelib/fs.stat/out/providers/async.d.ts","../../../node_modules/@nodelib/fs.stat/out/index.d.ts","../../../node_modules/@nodelib/fs.scandir/out/types/index.d.ts","../../../node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts","../../../node_modules/@nodelib/fs.scandir/out/settings.d.ts","../../../node_modules/@nodelib/fs.scandir/out/providers/async.d.ts","../../../node_modules/@nodelib/fs.scandir/out/index.d.ts","../../../node_modules/@nodelib/fs.walk/out/types/index.d.ts","../../../node_modules/@nodelib/fs.walk/out/settings.d.ts","../../../node_modules/@nodelib/fs.walk/out/readers/reader.d.ts","../../../node_modules/@nodelib/fs.walk/out/readers/async.d.ts","../../../node_modules/@nodelib/fs.walk/out/providers/async.d.ts","../../../node_modules/@nodelib/fs.walk/out/index.d.ts","../../../node_modules/fast-glob/out/types/index.d.ts","../../../node_modules/fast-glob/out/settings.d.ts","../../../node_modules/fast-glob/out/managers/tasks.d.ts","../../../node_modules/fast-glob/out/index.d.ts","../src/ggextensiondiscovery.ts","../src/secret.ts","../src/unreachablecode.ts","../src/deepclone.ts","../src/deepfreeze.ts","../src/environment.ts","../src/http.ts","../src/withtimeout.ts","../src/types.ts","../src/sleep.ts","../src/index-browser.ts","../src/index-node.ts"],"fileIdsList":[[66,115,132,133,170,171],[66,115,132,133,171,172,173,174],[66,115,132,133,165,171,173],[66,115,132,133,170,172],[66,115,127,132,133,165],[66,115,127,132,133,165,166],[66,115,132,133,166,167,168,169],[66,115,132,133,166,168],[66,115,132,133,167],[66,115,132,133,147,165,175,176,177,180],[66,115,132,133,176,177,179],[66,115,126,132,133,165,175,176,177,178],[66,115,132,133,177],[66,115,132,133,175,176],[66,115,132,133,165,175],[66,112,113,115,132,133],[66,114,115,132,133],[115,132,133],[66,115,120,132,133,150],[66,115,116,121,126,132,133,135,147,158],[66,115,116,117,126,132,133,135],[66,115,132,133],[61,62,63,66,115,132,133],[66,115,118,132,133,159],[66,115,119,120,127,132,133,136],[66,115,120,132,133,147,155],[66,115,121,123,126,132,133,135],[66,114,115,122,132,133],[66,115,123,124,132,133],[66,115,125,126,132,133],[66,114,115,126,132,133],[66,115,126,127,128,132,133,147,158],[66,115,126,127,128,132,133,142,147,150],[66,108,115,123,126,129,132,133,135,147,158],[66,115,126,127,129,130,132,133,135,147,155,158],[66,115,129,131,132,133,147,155,158],[64,65,66,67,68,69,70,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164],[66,115,126,132,133],[66,115,132,133,134,158],[66,115,123,126,132,133,135,147],[66,115,132,133,136],[66,115,132,133,137],[66,114,115,132,133,138],[66,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164],[66,115,132,133,140],[66,115,132,133,141],[66,115,126,132,133,142,143],[66,115,132,133,142,144,159,161],[66,115,127,132,133],[66,115,126,132,133,147,148,150],[66,115,132,133,149,150],[66,115,132,133,147,148],[66,115,132,133,150],[66,115,132,133,151],[66,112,115,132,133,147,152,158],[66,115,126,132,133,153,154],[66,115,132,133,153,154],[66,115,120,132,133,135,147,155],[66,115,132,133,156],[66,115,132,133,135,157],[66,115,129,132,133,141,158],[66,115,120,132,133,159],[66,115,132,133,147,160],[66,115,132,133,134,161],[66,115,132,133,162],[66,108,115,132,133],[66,108,115,126,128,132,133,138,147,150,158,160,161,163],[66,115,132,133,147,164],[66,115,132,133,165,182,183,184],[66,115,132,133,182,183],[66,115,132,133,182],[66,115,132,133,165,181],[66,80,84,115,132,133,158],[66,80,115,132,133,147,158],[66,75,115,132,133],[66,77,80,115,132,133,155,158],[66,115,132,133,135,155],[66,115,132,133,165],[66,75,115,132,133,165],[66,77,80,115,132,133,135,158],[66,72,73,76,79,115,126,132,133,147,158],[66,80,87,115,132,133],[66,72,78,115,132,133],[66,80,101,102,115,132,133],[66,76,80,115,132,133,150,158,165],[66,101,115,132,133,165],[66,74,75,115,132,133,165],[66,80,115,132,133],[66,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,102,103,104,105,106,107,115,132,133],[66,80,95,115,132,133],[66,80,87,88,115,132,133],[66,78,80,88,89,115,132,133],[66,79,115,132,133],[66,72,75,80,115,132,133],[66,80,84,88,89,115,132,133],[66,84,115,132,133],[66,78,80,83,115,132,133,158],[66,72,77,80,87,115,132,133],[66,115,132,133,147],[66,75,80,101,115,132,133,163,165],[66,115,127,132,133,137,158,185],[59,60,66,115,132,133,187,188,189,190,191,192,193,194,195],[59,60,66,115,132,133,186,187,188,189,190,191,192,193,194,195]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"04a4003ab34c3db124058179940c00f366f871d87ff1d318f13720c0b6269499","signature":"c65768cd4fb85d9e36452d3196129c5dfe2016e90dd4a7b9db1a0a526b6acf71"},{"version":"f369191ac0c4224b491791d2b711e0d8a29eaae730578a13c63016ee71feddb0","signature":"a6029bd9e1a0fa5cd425e1f674c07c6b7c7121f7a5b3c42445d974bf95f022fb"},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"f949f7f6c7802a338039cfc2156d1fe285cdd1e092c64437ebe15ae8edc854e0","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"83e63d6ccf8ec004a3bb6d58b9bb0104f60e002754b1e968024b320730cc5311","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2bc7425ef40526650d6db7e072c1ff4a51101c3ac2cc4b666623b19496a6e27","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"f27524f4bef4b6519c604bdb23bf4465bddcccbf3f003abb901acbd0d7404d99","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"6b039f55681caaf111d5eb84d292b9bee9e0131d0db1ad0871eef0964f533c73","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"0dba70b3fb0dcd713fda33c2df64fa6751fff6460e536971cee917260fb17882","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"9f663c2f91127ef7024e8ca4b3b4383ff2770e5f826696005de382282794b127","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"46324183533e34fad2461b51174132e8e0e4b3ac1ceb5032e4952992739d1eab","impliedFormat":1},{"version":"d3fa0530dfb1df408f0abd76486de39def69ca47683d4a3529b2d22fce27c693","impliedFormat":1},{"version":"d9be977c415df16e4defe4995caeca96e637eeef9d216d0d90cdba6fc617e97e","impliedFormat":1},{"version":"98e0c2b48d855a844099123e8ec20fe383ecd1c5877f3895b048656befe268d0","impliedFormat":1},{"version":"ff53802a97b7d11ab3c4395aa052baa14cd12d2b1ed236b520a833fdd2a15003","impliedFormat":1},{"version":"fce9262f840a74118112caf685b725e1cc86cd2b0927311511113d90d87cc61e","impliedFormat":1},{"version":"d7a7cac49af2a3bfc208fe68831fbfa569864f74a7f31cc3a607f641e6c583fd","impliedFormat":1},{"version":"9a80e3322d08274f0e41b77923c91fe67b2c8a5134a5278c2cb60a330441554e","impliedFormat":1},{"version":"2460af41191009298d931c592fb6d4151beea320f1f25b73605e2211e53e4e88","impliedFormat":1},{"version":"2f87ea988d84d1c617afdeba9d151435473ab24cd5fc456510c8db26d8bd1581","impliedFormat":1},{"version":"b7336c1c536e3deaedbda956739c6250ac2d0dd171730c42cb57b10368f38a14","impliedFormat":1},{"version":"6fb67d664aaab2f1d1ad4613b58548aecb4b4703b9e4c5dba6b865b31bd14722","impliedFormat":1},{"version":"4414644199b1a047b4234965e07d189781a92b578707c79c3933918d67cd9d85","impliedFormat":1},{"version":"04a4b38c6a1682059eac00e7d0948d99c46642b57003d61d0fe9ccc9df442887","impliedFormat":1},{"version":"f12ea658b060da1752c65ae4f1e4c248587f6cd4cb4acabbf79a110b6b02ff75","impliedFormat":1},{"version":"011b2857871a878d5eae463bedc4b3dd14755dc3a67d5d10f8fbb7823d119294","impliedFormat":1},{"version":"d406b797d7b2aff9f8bd6c023acfaa5a5fc415bfbf01975e23d415d3f54857af","impliedFormat":1},{"version":"7d71b2d1a537fe41760a16441cd95d98fcb59ddf9c714aba2fecba961ab253b6","impliedFormat":1},{"version":"a9bd8a2bbd03a72054cbdf0cd2a77fabea4e3ae591dd02b8f58bda0c34e50c1c","impliedFormat":1},{"version":"386cc88a3bdee8bc651ead59f8afc9dc5729fc933549bbd217409eabad05ba3e","impliedFormat":1},{"version":"3db191719d15341432d04b4bec0767f2e52c3bf7a3b10c1869604b312ec167b3","signature":"9e58eabb4032ee10a22ba8c8a7b51720195c2c98c68a4ba797137e59174ca939"},{"version":"565b2d44f499b7041ab79933ac8a041bdad5629dd4aec003bea4ba02a5ca1098","signature":"9fa082054107d2a84e14bbadcc23ab2a3be288a94bef093b5db64f8e0a5b209b"},{"version":"6fc71745fb086db4de247f9f62c7e1932d5c7c6f9d6a593feee7d76f0f2a5010","signature":"1343a42f89028fcbc5c8302e5fae78d2a982399139893cc47bc4f223f2942c3a"},{"version":"fa5a1bbd7930a3aa8dbbd8ce19e89603df3daca14f080e1b7ad815d3f42408d3","signature":"6d4df17a3023d1322b93fd13180aa124afb15ffa46a1e1d7be4254b99f2607b7"},{"version":"472816436c6db76434485c6257583dc150a2017733cd2e9aca9d91904584c040","signature":"8a3254b6044d539310af9012464153fdba211e49e566f7a12e0031d4c561b5fd"},{"version":"ade68182d7a12c48e460596b96462aa18372bd505e8c21577445b0dc2343b6ee","signature":"cf83b13efe5fed7adb487b02bb9bc36abbfc0c6662e08a3b6f7b61ac1c87c279"},{"version":"af392737db53a482cfda4c6ad3c013a62a806fe7be9e31c3b00ba3977ac39f75","signature":"3b14a186a46faffd819fd99e7a46e224f190409fb346e2f0539c37a5f436a595"},{"version":"e4542756b59d74ff2c036478942546e5937d35808eae08b6ae934164a7f2b97e","signature":"a06ad9d6b6f4a2fe7f0a84ad607dca415322b8395e15db8ddf48d87d66213f64"},{"version":"1f083bc5e8f2791b54ae5ebf69380dace5da834ecb9d37864dbe046aff3796cd","signature":"2c536dd329a8faf1b5e7b500a423c43ec7c4afc0e342196c04e2fe649facf9f4"},{"version":"a527c423aeb061ecf2d971a6e3bf624880c0408bcf72a97dacf82013235e6731","signature":"b009ffd1b3f2878bcac018215ffc07bf937c583366ba52a2a03bf938d0887006"},{"version":"cf809d1539975b39350e8306ffd0b6cd707eaa5f929a850e9eb4dd456fd65e67","signature":"db6d98370eb1179d82ac99cc1f6c871b13d88acea55111a487407037ae465e1f"},{"version":"1c558f5e6f4eeab86fff25eaa83643725ae793810f98aaf0513ed187e0157231","signature":"d3a11443d79c8d88d7296fc2832a10705661fbbeeedb149f8a61c517ee9a6219"}],"root":[59,60,[186,197]],"options":{"allowJs":false,"checkJs":false,"composite":false,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":99,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":false,"outDir":"./","rootDir":"..","skipLibCheck":true,"sourceMap":true,"target":9},"referencedMap":[[172,1],[175,2],[174,3],[173,4],[171,5],[167,6],[170,7],[169,8],[168,9],[166,5],[181,10],[180,11],[179,12],[178,13],[177,14],[176,15],[112,16],[113,16],[114,17],[66,18],[115,19],[116,20],[117,21],[61,22],[64,23],[62,22],[63,22],[118,24],[119,25],[120,26],[121,27],[122,28],[123,29],[124,29],[125,30],[126,31],[127,32],[128,33],[67,22],[65,22],[129,34],[130,35],[131,36],[165,37],[132,38],[133,22],[134,39],[135,40],[136,41],[137,42],[138,43],[139,44],[140,45],[141,46],[142,47],[143,47],[144,48],[145,22],[146,49],[147,50],[149,51],[148,52],[150,53],[151,54],[152,55],[153,56],[154,57],[155,58],[156,59],[157,60],[158,61],[159,62],[160,63],[161,64],[162,65],[68,22],[69,22],[70,22],[109,66],[110,22],[111,22],[163,67],[164,68],[71,22],[185,69],[184,70],[183,71],[182,72],[57,22],[58,22],[10,22],[12,22],[11,22],[2,22],[13,22],[14,22],[15,22],[16,22],[17,22],[18,22],[19,22],[20,22],[3,22],[21,22],[22,22],[4,22],[23,22],[27,22],[24,22],[25,22],[26,22],[28,22],[29,22],[30,22],[5,22],[31,22],[32,22],[33,22],[34,22],[6,22],[38,22],[35,22],[36,22],[37,22],[39,22],[7,22],[40,22],[45,22],[46,22],[41,22],[42,22],[43,22],[44,22],[8,22],[50,22],[47,22],[48,22],[49,22],[51,22],[9,22],[52,22],[53,22],[54,22],[56,22],[55,22],[1,22],[87,73],[97,74],[86,73],[107,75],[78,76],[77,77],[106,78],[100,79],[105,80],[80,81],[94,82],[79,83],[103,84],[75,85],[74,78],[104,86],[76,87],[81,88],[82,22],[85,88],[72,22],[108,89],[98,90],[89,91],[90,92],[92,93],[88,94],[91,95],[101,78],[83,96],[84,97],[93,98],[73,99],[96,90],[95,88],[99,22],[102,100],[189,22],[190,22],[191,22],[59,22],[60,22],[186,101],[192,22],[196,102],[197,103],[187,22],[195,22],[194,22],[188,22],[193,22]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197],"checkPending":true,"version":"5.9.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grest-ts/common",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "Common utility functions and types shared across all GG packages",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"browser": {
|
|
10
|
+
"types": "./dist/src/index-browser.d.ts",
|
|
11
|
+
"import": "./dist/src/index-browser.js"
|
|
12
|
+
},
|
|
13
|
+
"default": {
|
|
14
|
+
"types": "./dist/src/index-node.d.ts",
|
|
15
|
+
"import": "./dist/src/index-node.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"typecheck": "tsc --noEmit -p src"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/grest-ts/grest-ts.git",
|
|
32
|
+
"directory": "packages/common"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/grest-ts/grest-ts/tree/master/packages/common",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/grest-ts/grest-ts/issues"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"typescript",
|
|
40
|
+
"framework",
|
|
41
|
+
"contract",
|
|
42
|
+
"api",
|
|
43
|
+
"microservices",
|
|
44
|
+
"testing",
|
|
45
|
+
"utilities",
|
|
46
|
+
"shared",
|
|
47
|
+
"helpers"
|
|
48
|
+
],
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=22"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"fast-glob": "^3.3.3"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@grest-ts/x-packager": "0.0.5"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface IAsyncStorage<T> {
|
|
2
|
+
getStore(): T | undefined;
|
|
3
|
+
run<R>(store: T, fn: () => R): R;
|
|
4
|
+
enterWith(store: T): void;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class BrowserAsyncStorage<T> implements IAsyncStorage<T> {
|
|
8
|
+
private store: T | undefined;
|
|
9
|
+
|
|
10
|
+
getStore(): T | undefined {
|
|
11
|
+
return this.store;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
run<R>(store: T, fn: () => R): R {
|
|
15
|
+
const prev = this.store;
|
|
16
|
+
this.store = store;
|
|
17
|
+
try {
|
|
18
|
+
return fn();
|
|
19
|
+
} finally {
|
|
20
|
+
this.store = prev;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
enterWith(store: T): void {
|
|
25
|
+
this.store = store;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/GGError.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context for constructing GGError instances
|
|
3
|
+
* This is ONLY an input parameter - not stored on the error object
|
|
4
|
+
* All fields become direct readonly properties on GGError
|
|
5
|
+
*/
|
|
6
|
+
export interface GGErrorContext {
|
|
7
|
+
displayMessage?: string;
|
|
8
|
+
debugMessage?: string;
|
|
9
|
+
debugData?: any
|
|
10
|
+
originalError?: GGError | Error | string | unknown;
|
|
11
|
+
|
|
12
|
+
// Internal: Used only for deserialization from JSON
|
|
13
|
+
refId?: string;
|
|
14
|
+
timestamp?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* These values are only returned when running tests or locally.
|
|
19
|
+
*/
|
|
20
|
+
export interface GGErrorDebugMessage {
|
|
21
|
+
debugMessage?: string;
|
|
22
|
+
debugData?: any
|
|
23
|
+
originalError?: GGErrorDebugMessage | Error | string | unknown;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class GGError extends Error {
|
|
27
|
+
|
|
28
|
+
public readonly refId: string;
|
|
29
|
+
public readonly timestamp: number;
|
|
30
|
+
public readonly displayMessage?: string;
|
|
31
|
+
public readonly debugMessage?: string;
|
|
32
|
+
public readonly debugData?: any;
|
|
33
|
+
public readonly originalError?: GGError | Error | string | unknown;
|
|
34
|
+
|
|
35
|
+
constructor(message: string, context?: GGErrorContext | Error) {
|
|
36
|
+
|
|
37
|
+
if (context instanceof Error) {
|
|
38
|
+
context = {
|
|
39
|
+
originalError: context
|
|
40
|
+
}
|
|
41
|
+
} else if (!context) {
|
|
42
|
+
context = {};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let refId: string;
|
|
46
|
+
let timestamp: number;
|
|
47
|
+
if (context.originalError instanceof GGError) {
|
|
48
|
+
refId = context.originalError.refId;
|
|
49
|
+
timestamp = context.originalError.timestamp;
|
|
50
|
+
} else {
|
|
51
|
+
refId = context.refId ?? "ERR_REF_" + Math.random().toString(36).substring(2, 10) + Date.now().toString(36);
|
|
52
|
+
timestamp = context.timestamp ?? Date.now();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
super(message + " {" + refId + "} " + (context?.displayMessage ? ": " + context?.displayMessage : ""));
|
|
56
|
+
this.refId = refId
|
|
57
|
+
this.timestamp = timestamp
|
|
58
|
+
this.displayMessage = context.displayMessage;
|
|
59
|
+
this.debugMessage = context.debugMessage;
|
|
60
|
+
this.debugData = context.debugData;
|
|
61
|
+
this.originalError = context.originalError;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public static fromUnknown(error: unknown): GGError {
|
|
65
|
+
if (error instanceof GGError) {
|
|
66
|
+
return error;
|
|
67
|
+
} else if (error instanceof Error) {
|
|
68
|
+
return new GGError(error.message, error);
|
|
69
|
+
} else {
|
|
70
|
+
return new GGError("Unknown", {debugData: error});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import fg from 'fast-glob';
|
|
2
|
+
import * as fs from 'fs';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import {pathToFileURL} from 'url';
|
|
5
|
+
|
|
6
|
+
const TYPES_FILE = 'index.d.ts';
|
|
7
|
+
const LOCK_FILE = 'index.d.ts.lock';
|
|
8
|
+
|
|
9
|
+
const CACHE_START = '/* @cache-start ';
|
|
10
|
+
const CACHE_END = ' @cache-end */';
|
|
11
|
+
|
|
12
|
+
interface ExtensionCache {
|
|
13
|
+
lockfileMtime: number;
|
|
14
|
+
extensions: string[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Discovers extensions by scanning node_modules for packages
|
|
19
|
+
* that follow the convention of having a {name}/index-{name}.ts file.
|
|
20
|
+
*
|
|
21
|
+
* For example, with name="testkit":
|
|
22
|
+
* - Scans for: testkit/index-testkit.ts
|
|
23
|
+
* - Types dir: node_modules/@types/grest-ts-testkits
|
|
24
|
+
*
|
|
25
|
+
* Generates:
|
|
26
|
+
* - node_modules/@types/grest-ts-{name}s/index.d.ts - For IDE type completion (triple-slash references)
|
|
27
|
+
*
|
|
28
|
+
* Runtime loading is done via dynamic imports of discovered extensions.
|
|
29
|
+
*/
|
|
30
|
+
export class GGExtensionDiscovery {
|
|
31
|
+
|
|
32
|
+
private static loadedExtensions = new Set<string>();
|
|
33
|
+
|
|
34
|
+
private readonly name: string;
|
|
35
|
+
private readonly typesDir: string;
|
|
36
|
+
private readonly filePattern: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a new extension discovery instance.
|
|
40
|
+
* @param name The extension name (e.g., "testkit", "codegen")
|
|
41
|
+
*/
|
|
42
|
+
constructor(name: string) {
|
|
43
|
+
this.name = name;
|
|
44
|
+
this.typesDir = `node_modules/@types/grest-ts-${name}s`;
|
|
45
|
+
this.filePattern = `${name}/index-${name}.ts`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Generate types file for IDE support without loading extensions.
|
|
50
|
+
* Use this during build/check steps to ensure IDE has proper type completion.
|
|
51
|
+
*/
|
|
52
|
+
public async generateTypes(): Promise<void> {
|
|
53
|
+
const cwd = process.cwd();
|
|
54
|
+
const typesDir = path.join(cwd, this.typesDir);
|
|
55
|
+
const typesFile = path.join(typesDir, TYPES_FILE);
|
|
56
|
+
|
|
57
|
+
const lockfileMtime = this.getLockfileMtime(cwd);
|
|
58
|
+
const extensions = await this.scan(cwd);
|
|
59
|
+
this.writeTypesFile(typesFile, extensions, typesDir, lockfileMtime);
|
|
60
|
+
console.log(`[GG${this.capitalize(this.name)}] Generated types for ${extensions.length} ${this.name}(s)`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Discover and load all extensions.
|
|
65
|
+
* - Scans for extension packages
|
|
66
|
+
* - Generates .d.ts file for IDE support
|
|
67
|
+
* - Dynamically imports extensions for runtime
|
|
68
|
+
*/
|
|
69
|
+
public async load(): Promise<void> {
|
|
70
|
+
if (GGExtensionDiscovery.loadedExtensions.has(this.name)) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
GGExtensionDiscovery.loadedExtensions.add(this.name);
|
|
74
|
+
|
|
75
|
+
const cwd = process.cwd();
|
|
76
|
+
const typesDir = path.join(cwd, this.typesDir);
|
|
77
|
+
const typesFile = path.join(typesDir, TYPES_FILE);
|
|
78
|
+
const lockFile = path.join(typesDir, LOCK_FILE);
|
|
79
|
+
|
|
80
|
+
// Try to acquire lock
|
|
81
|
+
if (this.acquireLock(lockFile)) {
|
|
82
|
+
try {
|
|
83
|
+
await this.discoverAndLoad(cwd, typesFile, typesDir);
|
|
84
|
+
} finally {
|
|
85
|
+
this.releaseLock(lockFile);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
// Wait for lock to be released, then load from cache
|
|
89
|
+
await this.waitForLock(lockFile);
|
|
90
|
+
await this.loadFromCache(typesFile);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private acquireLock(lockFile: string): boolean {
|
|
95
|
+
try {
|
|
96
|
+
fs.mkdirSync(path.dirname(lockFile), {recursive: true});
|
|
97
|
+
fs.writeFileSync(lockFile, String(process.pid), {flag: 'wx'});
|
|
98
|
+
return true;
|
|
99
|
+
} catch {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private releaseLock(lockFile: string): void {
|
|
105
|
+
try {
|
|
106
|
+
fs.unlinkSync(lockFile);
|
|
107
|
+
} catch {
|
|
108
|
+
// Ignore
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private async waitForLock(lockFile: string, timeout = 30000): Promise<void> {
|
|
113
|
+
const start = Date.now();
|
|
114
|
+
while (Date.now() - start < timeout) {
|
|
115
|
+
if (!fs.existsSync(lockFile)) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
await new Promise(r => setTimeout(r, 50));
|
|
119
|
+
}
|
|
120
|
+
// Timeout - try to clean up stale lock
|
|
121
|
+
this.releaseLock(lockFile);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private async discoverAndLoad(cwd: string, typesFile: string, typesDir: string): Promise<void> {
|
|
125
|
+
const lockfileMtime = this.getLockfileMtime(cwd);
|
|
126
|
+
|
|
127
|
+
// Check cache embedded in types file
|
|
128
|
+
const cached = this.readCache(typesFile);
|
|
129
|
+
let extensions: string[];
|
|
130
|
+
|
|
131
|
+
if (cached && cached.lockfileMtime === lockfileMtime) {
|
|
132
|
+
extensions = cached.extensions;
|
|
133
|
+
} else {
|
|
134
|
+
extensions = await this.scan(cwd);
|
|
135
|
+
this.writeTypesFile(typesFile, extensions, typesDir, lockfileMtime);
|
|
136
|
+
console.log(`[GG${this.capitalize(this.name)}] Discovered ${extensions.length} ${this.name}(s)`);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Dynamically import all extensions
|
|
140
|
+
for (const extension of extensions) {
|
|
141
|
+
await import(pathToFileURL(extension).href);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
private async loadFromCache(typesFile: string): Promise<void> {
|
|
146
|
+
const cached = this.readCache(typesFile);
|
|
147
|
+
|
|
148
|
+
if (cached) {
|
|
149
|
+
for (const extension of cached.extensions) {
|
|
150
|
+
await import(pathToFileURL(extension).href);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
public async scan(cwd: string): Promise<string[]> {
|
|
156
|
+
const extensions: string[] = [];
|
|
157
|
+
|
|
158
|
+
// Resolve extensions by reading package.json dependencies and walking up
|
|
159
|
+
// node_modules directories (like Node.js module resolution).
|
|
160
|
+
// This works regardless of hoisting, workspaces, pnpm, etc.
|
|
161
|
+
const depNames = this.readDependencyNames(cwd);
|
|
162
|
+
|
|
163
|
+
for (const dep of depNames) {
|
|
164
|
+
const pkgDir = this.resolvePackageDir(dep, cwd);
|
|
165
|
+
if (pkgDir) {
|
|
166
|
+
// Check source path first (local dev with tsx), then compiled dist path (published packages)
|
|
167
|
+
const sourceFile = path.join(pkgDir, this.filePattern);
|
|
168
|
+
const distFile = path.join(pkgDir, 'dist', this.filePattern.replace(/\.ts$/, '.js'));
|
|
169
|
+
if (fs.existsSync(sourceFile)) {
|
|
170
|
+
extensions.push(sourceFile);
|
|
171
|
+
} else if (fs.existsSync(distFile)) {
|
|
172
|
+
extensions.push(distFile);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Also scan monorepo packages/ directories (for framework development)
|
|
178
|
+
const monorepoRoot = this.findMonorepoRoot(cwd);
|
|
179
|
+
if (monorepoRoot) {
|
|
180
|
+
const monorepoExtensions = await fg([
|
|
181
|
+
`packages/*/${this.filePattern}`,
|
|
182
|
+
`packages/*/*/${this.filePattern}`,
|
|
183
|
+
`packages-*/*/${this.filePattern}`,
|
|
184
|
+
`packages-*/*/*/${this.filePattern}`,
|
|
185
|
+
], {
|
|
186
|
+
cwd: monorepoRoot,
|
|
187
|
+
absolute: true,
|
|
188
|
+
onlyFiles: true
|
|
189
|
+
});
|
|
190
|
+
extensions.push(...monorepoExtensions);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Resolve symlinks to real paths before deduping to avoid loading same file twice
|
|
194
|
+
// (e.g., node_modules/@grest-ts/foo -> packages/foo would otherwise be seen as different)
|
|
195
|
+
const resolvedExtensions = extensions.map(ext => fs.realpathSync(ext));
|
|
196
|
+
return [...new Set(resolvedExtensions)].sort();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Resolve a package's install directory by walking up node_modules directories from cwd.
|
|
201
|
+
* Mimics Node.js module resolution: checks cwd/node_modules/<pkg>, ../node_modules/<pkg>, etc.
|
|
202
|
+
*/
|
|
203
|
+
private resolvePackageDir(dep: string, cwd: string): string | null {
|
|
204
|
+
let dir = cwd;
|
|
205
|
+
const root = path.parse(dir).root;
|
|
206
|
+
while (dir !== root) {
|
|
207
|
+
const pkgDir = path.join(dir, 'node_modules', dep);
|
|
208
|
+
if (fs.existsSync(path.join(pkgDir, 'package.json'))) {
|
|
209
|
+
return pkgDir;
|
|
210
|
+
}
|
|
211
|
+
dir = path.dirname(dir);
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
private readDependencyNames(cwd: string): string[] {
|
|
217
|
+
try {
|
|
218
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf-8'));
|
|
219
|
+
return [
|
|
220
|
+
...Object.keys(pkg.dependencies || {}),
|
|
221
|
+
...Object.keys(pkg.devDependencies || {}),
|
|
222
|
+
];
|
|
223
|
+
} catch {
|
|
224
|
+
return [];
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
public findMonorepoRoot(startDir: string): string | null {
|
|
229
|
+
let currentDir = startDir;
|
|
230
|
+
const root = path.parse(currentDir).root;
|
|
231
|
+
|
|
232
|
+
while (currentDir !== root) {
|
|
233
|
+
const packagesPath = path.join(currentDir, 'packages');
|
|
234
|
+
try {
|
|
235
|
+
const stat = fs.statSync(packagesPath);
|
|
236
|
+
if (stat.isDirectory()) {
|
|
237
|
+
return currentDir;
|
|
238
|
+
}
|
|
239
|
+
} catch {
|
|
240
|
+
// Directory doesn't exist, continue up
|
|
241
|
+
}
|
|
242
|
+
currentDir = path.dirname(currentDir);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
private getLockfileMtime(cwd: string): number {
|
|
249
|
+
const lockfiles = ['pnpm-lock.yaml', 'package-lock.json', 'yarn.lock'];
|
|
250
|
+
|
|
251
|
+
// Walk up directories to find lockfile (handles workspaces where lockfile is at root)
|
|
252
|
+
let dir = cwd;
|
|
253
|
+
const root = path.parse(dir).root;
|
|
254
|
+
while (dir !== root) {
|
|
255
|
+
for (const lockfile of lockfiles) {
|
|
256
|
+
try {
|
|
257
|
+
return fs.statSync(path.join(dir, lockfile)).mtimeMs;
|
|
258
|
+
} catch {
|
|
259
|
+
// File doesn't exist, try next
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
dir = path.dirname(dir);
|
|
263
|
+
}
|
|
264
|
+
return 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
private readCache(typesFile: string): ExtensionCache | null {
|
|
268
|
+
try {
|
|
269
|
+
const content = fs.readFileSync(typesFile, 'utf-8');
|
|
270
|
+
const startIdx = content.indexOf(CACHE_START);
|
|
271
|
+
const endIdx = content.indexOf(CACHE_END);
|
|
272
|
+
if (startIdx === -1 || endIdx === -1) {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
const jsonStr = content.slice(startIdx + CACHE_START.length, endIdx).trim();
|
|
276
|
+
return JSON.parse(jsonStr);
|
|
277
|
+
} catch {
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
private writeTypesFile(typesFile: string, extensions: string[], typesDir: string, lockfileMtime: number): void {
|
|
283
|
+
const lines = [
|
|
284
|
+
`// Auto-generated by GGExtensionDiscovery (${this.name}) - DO NOT EDIT`,
|
|
285
|
+
'// TypeScript automatically includes @types/* packages, so no tsconfig changes needed.',
|
|
286
|
+
''
|
|
287
|
+
];
|
|
288
|
+
|
|
289
|
+
for (const extension of extensions) {
|
|
290
|
+
const relativePath = path.relative(typesDir, extension).replace(/\\/g, '/');
|
|
291
|
+
lines.push(`/// <reference path="${relativePath}" />`);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Embed cache as JSON block comment at end of file (single line so TypeScript ignores it)
|
|
295
|
+
lines.push('');
|
|
296
|
+
lines.push(CACHE_START + JSON.stringify({lockfileMtime, extensions}) + CACHE_END);
|
|
297
|
+
lines.push('');
|
|
298
|
+
|
|
299
|
+
fs.mkdirSync(typesDir, {recursive: true});
|
|
300
|
+
fs.writeFileSync(typesFile, lines.join('\n'));
|
|
301
|
+
|
|
302
|
+
// Write package.json to make it a proper @types package
|
|
303
|
+
const packageJson = {
|
|
304
|
+
name: `@types/grest-ts-${this.name}s`,
|
|
305
|
+
version: '1.0.0',
|
|
306
|
+
types: 'index.d.ts'
|
|
307
|
+
};
|
|
308
|
+
fs.writeFileSync(path.join(typesDir, 'package.json'), JSON.stringify(packageJson, null, 2));
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
private capitalize(str: string): string {
|
|
312
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
313
|
+
}
|
|
314
|
+
}
|
package/src/Secret.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secret - A wrapper for sensitive values that prevents accidental logging.
|
|
3
|
+
*
|
|
4
|
+
* Secrets are automatically redacted when:
|
|
5
|
+
* - Converted to string (toString)
|
|
6
|
+
* - Serialized to JSON (toJSON)
|
|
7
|
+
* - Logged with console.log or util.inspect
|
|
8
|
+
*
|
|
9
|
+
* To access the actual value, you must explicitly call unwrap().
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const dbPassword = new Secret('super-secret-password');
|
|
14
|
+
*
|
|
15
|
+
* console.log(dbPassword); // "[REDACTED]"
|
|
16
|
+
* console.log(JSON.stringify(dbPassword)); // "[REDACTED]"
|
|
17
|
+
*
|
|
18
|
+
* // Explicit unwrap required to get value
|
|
19
|
+
* const password = dbPassword.unwrap();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export class Secret {
|
|
23
|
+
#value: string;
|
|
24
|
+
constructor(value: string) {
|
|
25
|
+
this.#value = value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get the actual secret value.
|
|
30
|
+
* Use with care - avoid logging the result.
|
|
31
|
+
*/
|
|
32
|
+
unwrap(): string {
|
|
33
|
+
return this.#value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if the secret has a non-empty value.
|
|
38
|
+
*/
|
|
39
|
+
hasValue(): boolean {
|
|
40
|
+
return this.#value.length > 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Compare with another secret without exposing either value.
|
|
45
|
+
*/
|
|
46
|
+
equals(other: Secret): boolean {
|
|
47
|
+
return this.#value === other.#value;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Prevent accidental logging/serialization
|
|
51
|
+
|
|
52
|
+
toString(): string {
|
|
53
|
+
return '[REDACTED]';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
toJSON(): string {
|
|
57
|
+
return '[REDACTED]';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Node.js console.log and util.inspect use this
|
|
61
|
+
[Symbol.for('nodejs.util.inspect.custom')](): string {
|
|
62
|
+
return '[REDACTED]';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Prevent valueOf from leaking
|
|
66
|
+
valueOf(): string {
|
|
67
|
+
return '[REDACTED]';
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Type guard to check if a value is a Secret.
|
|
73
|
+
*/
|
|
74
|
+
export function isSecret(value: unknown): value is Secret {
|
|
75
|
+
return value instanceof Secret;
|
|
76
|
+
}
|