@opencode-ai/cli-darwin-arm64 0.0.0-beta-202606050000
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/bin/chunk-01tb5qes.js.map +131 -0
- package/bin/chunk-06d8aa69.js.map +10 -0
- package/bin/chunk-07w2xsfy.js.map +50 -0
- package/bin/chunk-0azwkk9z.js.map +12 -0
- package/bin/chunk-0d9ja06r.js.map +9 -0
- package/bin/chunk-0qebdpsf.js.map +167 -0
- package/bin/chunk-17j53wgt.js.map +11 -0
- package/bin/chunk-1jb1dn9p.js.map +10 -0
- package/bin/chunk-1paeax4j.js.map +56 -0
- package/bin/chunk-1wb39pye.js.map +9 -0
- package/bin/chunk-2wqpg9fb.js.map +10 -0
- package/bin/chunk-32ewzcjk.js.map +10 -0
- package/bin/chunk-3jqjf0hd.js.map +10 -0
- package/bin/chunk-3n6vddyq.js.map +73 -0
- package/bin/chunk-3r74gwy2.js.map +13 -0
- package/bin/chunk-3zmvhepw.js.map +10 -0
- package/bin/chunk-4980h0t7.js.map +37 -0
- package/bin/chunk-4de8gawx.js.map +10 -0
- package/bin/chunk-4q5k6a0e.js.map +10 -0
- package/bin/chunk-6ttpn29p.js.map +10 -0
- package/bin/chunk-7fvpf4bs.js.map +10 -0
- package/bin/chunk-7vb6kdat.js.map +10 -0
- package/bin/chunk-84amh6xf.js.map +11 -0
- package/bin/chunk-8akfq1ty.js.map +19 -0
- package/bin/chunk-8dnkfkds.js.map +10 -0
- package/bin/chunk-8rd9r1gb.js.map +11 -0
- package/bin/chunk-8x80qvzn.js.map +10 -0
- package/bin/chunk-943th5qs.js.map +10 -0
- package/bin/chunk-94yf089p.js.map +10 -0
- package/bin/chunk-98cxndhz.js.map +9 -0
- package/bin/chunk-9f8tmby0.js.map +9 -0
- package/bin/chunk-9fbstsnw.js.map +9 -0
- package/bin/chunk-9hq8aywf.js.map +10 -0
- package/bin/chunk-9vf55fj3.js.map +10 -0
- package/bin/chunk-9w9rk9en.js.map +20 -0
- package/bin/chunk-9y4hgfns.js.map +10 -0
- package/bin/chunk-aag5p1fp.js.map +10 -0
- package/bin/chunk-bt0r89ee.js.map +9 -0
- package/bin/chunk-c2gsyspz.js.map +10 -0
- package/bin/chunk-c8hr0q5n.js.map +10 -0
- package/bin/chunk-cab6ccj0.js.map +10 -0
- package/bin/chunk-ck4nkjtx.js.map +193 -0
- package/bin/chunk-cvm4kr56.js.map +23 -0
- package/bin/chunk-cyb9bpgm.js.map +10 -0
- package/bin/chunk-d1p8awq6.js.map +10 -0
- package/bin/chunk-d6nz1m6v.js.map +10 -0
- package/bin/chunk-d7v38w4j.js.map +27 -0
- package/bin/chunk-d9g5798m.js.map +81 -0
- package/bin/chunk-dcn0azxw.js.map +10 -0
- package/bin/chunk-dk4qekzk.js.map +10 -0
- package/bin/chunk-dk9tgwkh.js.map +9 -0
- package/bin/chunk-dzzhxh1c.js.map +10 -0
- package/bin/chunk-efsmps94.js.map +9 -0
- package/bin/chunk-fdw7znt6.js.map +11 -0
- package/bin/chunk-fs6t8jdg.js.map +10 -0
- package/bin/chunk-fzcqzwx5.js.map +10 -0
- package/bin/chunk-g4fcmhkj.js.map +11 -0
- package/bin/chunk-g4ff66n8.js.map +10 -0
- package/bin/chunk-g8mpn6ke.js.map +11 -0
- package/bin/chunk-gahs293a.js.map +10 -0
- package/bin/chunk-gh9dcqbv.js.map +10 -0
- package/bin/chunk-gv6nagng.js.map +10 -0
- package/bin/chunk-gyavdmtb.js.map +10 -0
- package/bin/chunk-h413ry19.js.map +10 -0
- package/bin/chunk-hav16yge.js.map +10 -0
- package/bin/chunk-hp5nnq6f.js.map +11 -0
- package/bin/chunk-hrcbafh3.js.map +9 -0
- package/bin/chunk-hxfsfpek.js.map +10 -0
- package/bin/chunk-jcqp2wmf.js.map +10 -0
- package/bin/chunk-jt9t8203.js.map +9 -0
- package/bin/chunk-k0980eb5.js.map +10 -0
- package/bin/chunk-kghptcgb.js.map +9 -0
- package/bin/chunk-kjyd3xxc.js.map +113 -0
- package/bin/chunk-kkcy6sfm.js.map +577 -0
- package/bin/chunk-kkvk5eez.js.map +10 -0
- package/bin/chunk-kv0b3sh5.js.map +10 -0
- package/bin/chunk-m9md5mth.js.map +10 -0
- package/bin/chunk-mf0qqhvb.js.map +10 -0
- package/bin/chunk-mfr0xsxw.js.map +9 -0
- package/bin/chunk-mkze6twx.js.map +10 -0
- package/bin/chunk-mzjs3qj3.js.map +10 -0
- package/bin/chunk-n10mj2m3.js.map +17 -0
- package/bin/chunk-n2fbt143.js.map +9 -0
- package/bin/chunk-n6a0rctn.js.map +9 -0
- package/bin/chunk-njn9a3jp.js.map +13 -0
- package/bin/chunk-nkhzpsnk.js.map +13 -0
- package/bin/chunk-ny5cyeha.js.map +10 -0
- package/bin/chunk-p3nkd9t2.js.map +10 -0
- package/bin/chunk-p3pr1t3k.js.map +10 -0
- package/bin/chunk-p7j7e7hb.js.map +10 -0
- package/bin/chunk-p89bk96c.js.map +10 -0
- package/bin/chunk-pjbsd0sw.js.map +10 -0
- package/bin/chunk-pnkd37ss.js.map +20 -0
- package/bin/chunk-q6nf6fka.js.map +10 -0
- package/bin/chunk-qbpebjh2.js.map +10 -0
- package/bin/chunk-qgpzv4wt.js.map +15 -0
- package/bin/chunk-qq4f9z8v.js.map +10 -0
- package/bin/chunk-r55kafff.js.map +9 -0
- package/bin/chunk-rrwp4x01.js.map +10 -0
- package/bin/chunk-rt02k446.js.map +11 -0
- package/bin/chunk-s39nwv01.js.map +9 -0
- package/bin/chunk-s983v0dp.js.map +10 -0
- package/bin/chunk-san15sca.js.map +10 -0
- package/bin/chunk-sfk73pp2.js.map +10 -0
- package/bin/chunk-sjd3wbjd.js.map +10 -0
- package/bin/chunk-sv47gsr1.js.map +388 -0
- package/bin/chunk-swbdmja3.js.map +10 -0
- package/bin/chunk-tc8tvjey.js.map +33 -0
- package/bin/chunk-tcqtz83b.js.map +10 -0
- package/bin/chunk-tgxxchfy.js.map +28 -0
- package/bin/chunk-tvxakxv2.js.map +10 -0
- package/bin/chunk-va2h4xya.js.map +37 -0
- package/bin/chunk-vezq3hc4.js.map +9 -0
- package/bin/chunk-vmbpvmpg.js.map +10 -0
- package/bin/chunk-vs30er58.js.map +10 -0
- package/bin/chunk-w7p62pb6.js.map +17 -0
- package/bin/chunk-wr4x72qd.js.map +13 -0
- package/bin/chunk-x3ywttp7.js.map +10 -0
- package/bin/chunk-x988wmrk.js.map +10 -0
- package/bin/chunk-x9zjg1f7.js.map +20 -0
- package/bin/chunk-xaqrhtz6.js.map +10 -0
- package/bin/chunk-xd2mrkwy.js.map +10 -0
- package/bin/chunk-xfh2377b.js.map +10 -0
- package/bin/chunk-xs0ras4j.js.map +51 -0
- package/bin/chunk-xt7ap9fb.js.map +10 -0
- package/bin/chunk-xvkccqdg.js.map +13 -0
- package/bin/chunk-xya5qk3h.js.map +16 -0
- package/bin/chunk-yg7w4jgd.js.map +10 -0
- package/bin/chunk-yhpv46tb.js.map +20 -0
- package/bin/chunk-ymy66kr8.js.map +15 -0
- package/bin/chunk-yx4z6xsb.js.map +11 -0
- package/bin/chunk-yymwxqpy.js.map +10 -0
- package/bin/chunk-z70c75xe.js.map +11 -0
- package/bin/chunk-zkqyr3hc.js.map +10 -0
- package/bin/index.js.map +12 -0
- package/bin/lildax +0 -0
- package/package.json +15 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nexport const ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nexport const ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nexport const ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = new Set([\"localhost\", \"127.0.0.1\"]);\nconst GREENGRASS_PROTOCOLS = new Set([\"http:\", \"https:\"]);\nconst getCmdsUri = async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n let parsed;\n try {\n parsed = new URL(process.env[ENV_CMDS_FULL_URI]);\n }\n catch {\n throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });\n }\n if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {\n throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger,\n });\n }\n if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {\n throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger,\n });\n }\n return {\n protocol: parsed.protocol,\n hostname: parsed.hostname,\n path: parsed.pathname + parsed.search,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", {\n tryNextLink: false,\n logger,\n });\n};\n",
|
|
6
|
+
"export const isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nexport const fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...(creds.AccountId && { accountId: creds.AccountId }),\n});\n",
|
|
7
|
+
"export const DEFAULT_TIMEOUT = 1000;\nexport const DEFAULT_MAX_RETRIES = 0;\nexport const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n",
|
|
8
|
+
"import { request } from \"node:http\";\nimport { ProviderError } from \"@smithy/core/config\";\nexport function httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = request({\n method: \"GET\",\n ...options,\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n",
|
|
9
|
+
"export const retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\n",
|
|
10
|
+
"import { CredentialsProviderError, loadConfig } from \"@smithy/core/config\";\nimport { InstanceMetadataV1FallbackError } from \"./error/InstanceMetadataV1FallbackError\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nimport { getInstanceMetadataEndpoint } from \"./utils/getInstanceMetadataEndpoint\";\nimport { staticStabilityProvider } from \"./utils/staticStabilityProvider\";\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n",
|
|
11
|
+
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport class InstanceMetadataV1FallbackError extends CredentialsProviderError {\n tryNextLink;\n name = \"InstanceMetadataV1FallbackError\";\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);\n }\n}\n",
|
|
12
|
+
"import { loadConfig } from \"@smithy/core/config\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { Endpoint as InstanceMetadataEndpoint } from \"../config/Endpoint\";\nimport { ENDPOINT_CONFIG_OPTIONS } from \"../config/EndpointConfigOptions\";\nimport { EndpointMode } from \"../config/EndpointMode\";\nimport { ENDPOINT_MODE_CONFIG_OPTIONS, } from \"../config/EndpointModeConfigOptions\";\nexport const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nconst getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return InstanceMetadataEndpoint.IPv4;\n case EndpointMode.IPv6:\n return InstanceMetadataEndpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);\n }\n};\n",
|
|
13
|
+
"export var Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint || (Endpoint = {}));\n",
|
|
14
|
+
"export const ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nexport const CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nexport const ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n",
|
|
15
|
+
"export var EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n",
|
|
16
|
+
"import { EndpointMode } from \"./EndpointMode\";\nexport const ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nexport const CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nexport const ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode.IPv4,\n};\n",
|
|
17
|
+
"const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nconst STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nconst STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nexport const getExtendedInstanceMetadataCredentials = (credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS +\n Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1000);\n logger.warn(\"Attempting credential expiration extension due to a credential service availability issue. A refresh of these \" +\n `credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: ` +\n STATIC_STABILITY_DOC_URL);\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...(originalExpiration ? { originalExpiration } : {}),\n expiration: newExpiration,\n };\n};\n",
|
|
18
|
+
"import { getExtendedInstanceMetadataCredentials } from \"./getExtendedInstanceMetadataCredentials\";\nexport const staticStabilityProvider = (provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n }\n catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n }\n else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n};\n"
|
|
19
|
+
],
|
|
20
|
+
"mappings": ";kJAAA,oBCAO,SAAM,EAAoB,CAAC,IAAQ,QAAQ,CAAG,GACjD,OAAO,IAAQ,UACf,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,kBAAoB,UAC/B,OAAO,EAAI,QAAU,UACrB,OAAO,EAAI,aAAe,SACjB,EAAsB,CAAC,KAAW,CAC3C,YAAa,EAAM,YACnB,gBAAiB,EAAM,gBACvB,aAAc,EAAM,MACpB,WAAY,IAAI,KAAK,EAAM,UAAU,KACjC,EAAM,WAAa,CAAE,UAAW,EAAM,SAAU,CACxD,GCZO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A2B,CAChC,EACA,SACJ,CAAC,KAIP,GAAmB,MAAO,IAAY,EAAY,IACjD,EACH,KAAM,GACN,OAAQ,MACR,QAAS,CACL,uCAAwC,OAC5C,CACJ,CAAC,EACK,GAAa,MAAO,KAAa,MAAM,EAAY,IAAK,EAAS,KAAM,CAAU,CAAC,GAAG,SAAS,EAC9F,GAA4B,MAAO,EAAS,EAAS,IAAS,CAChE,IAAM,EAAsB,KAAK,OAAO,MAAM,EAAY,IACnD,EACH,KAAM,EAAY,CACtB,CAAC,GAAG,SAAS,CAAC,EACd,GAAI,CAAC,EAAkB,CAAmB,EACtC,MAAM,IAAI,2BAAyB,4DAA6D,CAC5F,OAAQ,EAAK,MACjB,CAAC,EAEL,OAAO,EAAoB,CAAmB",
|
|
21
|
+
"debugId": "EB0A6CB19D380E5464756E2164756E21",
|
|
22
|
+
"names": []
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../core/src/database/migration/20260511173437_session-metadata.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260511173437_session-metadata\",\n up(tx) {\n return Effect.gen(function* () {\n // This column briefly shipped again under 20260530232709_lovely_romulus.\n if (\n (yield* tx.all<{ name: string }>(`PRAGMA table_info(\\`session\\`)`)).some((column) => column.name === \"metadata\")\n )\n return\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`metadata\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";wHAGA,SAAe,QACb,GAAI,kCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAE7B,IACG,MAAO,EAAG,IAAsB,8BAAgC,GAAG,KAAK,CAAC,IAAW,EAAO,OAAS,UAAU,EAE/G,OACF,MAAO,EAAG,IAAI,4CAAgD,EAC/D,EAEL",
|
|
8
|
+
"debugId": "D7AD1C61BB1194BF64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../core/src/database/migration/20260413175956_chief_energizer.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260413175956_chief_energizer\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_entry\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`type\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_session_entry_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`CREATE INDEX \\`session_entry_session_idx\\` ON \\`session_entry\\` (\\`session_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_entry_session_type_idx\\` ON \\`session_entry\\` (\\`session_id\\`,\\`type\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_entry_time_created_idx\\` ON \\`session_entry\\` (\\`time_created\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";wHAGA,SAAe,QACb,GAAI,iCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2aAUb,EACD,MAAO,EAAG,IAAI,6EAAmF,EACjG,MAAO,EAAG,IAAI,yFAAiG,EAC/G,MAAO,EAAG,IAAI,oFAA0F,EACzG,EAEL",
|
|
8
|
+
"debugId": "E24FDD06869F7A2264756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../core/src/database/migration/20260410174513_workspace-name.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260410174513_workspace-name\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`PRAGMA foreign_keys=OFF;`)\n yield* tx.run(`\n CREATE TABLE \\`__new_workspace\\` (\n \\`id\\` text PRIMARY KEY,\n \\`type\\` text NOT NULL,\n \\`name\\` text DEFAULT '' NOT NULL,\n \\`branch\\` text,\n \\`directory\\` text,\n \\`extra\\` text,\n \\`project_id\\` text NOT NULL,\n CONSTRAINT \\`fk_workspace_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `INSERT INTO \\`__new_workspace\\`(\\`id\\`, \\`type\\`, \\`branch\\`, \\`name\\`, \\`directory\\`, \\`extra\\`, \\`project_id\\`) SELECT \\`id\\`, \\`type\\`, \\`branch\\`, \\`name\\`, \\`directory\\`, \\`extra\\`, \\`project_id\\` FROM \\`workspace\\`;`,\n )\n yield* tx.run(`DROP TABLE \\`workspace\\`;`)\n yield* tx.run(`ALTER TABLE \\`__new_workspace\\` RENAME TO \\`workspace\\`;`)\n yield* tx.run(`PRAGMA foreign_keys=ON;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";wHAGA,SAAe,QACb,GAAI,gCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,0BAA0B,EACxC,MAAO,EAAG,IAAI,4aAWb,EACD,MAAO,EAAG,IACR,+LACF,EACA,MAAO,EAAG,IAAI,yBAA2B,EACzC,MAAO,EAAG,IAAI,sDAA0D,EACxE,MAAO,EAAG,IAAI,yBAAyB,EACxC,EAEL",
|
|
8
|
+
"debugId": "B92EAEDC2DE3843964756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/.bun/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/process/ChildProcessSpawner.js", "../../node_modules/.bun/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/process/ChildProcess.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/internal/utils.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodeSink.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodeStream.js", "../../node_modules/.bun/effect@4.0.0-beta.74/node_modules/effect/dist/Crypto.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.74+d320dc57ebc716a1/node_modules/@effect/platform-node/dist/NodeCrypto.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.74+d320dc57ebc716a1/node_modules/@effect/platform-node/dist/NodeFileSystem.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodePath.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.74+d320dc57ebc716a1/node_modules/@effect/platform-node/dist/NodePath.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodeStdio.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.74+d320dc57ebc716a1/node_modules/@effect/platform-node/dist/NodeStdio.js", "../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.74+73cc5e1e7b464e3a/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.74+d320dc57ebc716a1/node_modules/@effect/platform-node/dist/NodeTerminal.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.74+d320dc57ebc716a1/node_modules/@effect/platform-node/dist/NodeServices.js"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Service contract and helpers for running child processes through Effect.\n *\n * This module defines the {@link ChildProcessSpawner} service used by child\n * process commands to start operating-system processes. A spawner turns a\n * command description into a {@link ChildProcessHandle}, which exposes scoped\n * lifecycle operations: write to stdin, stream stdout and stderr, wait for the\n * exit code, kill the process, inspect whether it is still running, and\n * temporarily unreference it from the parent process.\n *\n * Use this module when implementing a platform-specific process backend or\n * when code needs direct access to the process service. Most applications build\n * commands with the `ChildProcess` module; this service is the lower-level\n * execution boundary and also provides convenience methods for collecting exit\n * codes, strings, and output lines. The {@link make} constructor derives those\n * helpers from one primitive `spawn` implementation, so adapters only need to\n * supply process creation.\n *\n * @since 4.0.0\n */\nimport * as Brand from \"../../Brand.js\";\nimport * as Context from \"../../Context.js\";\nimport * as Effect from \"../../Effect.js\";\nimport * as Inspectable from \"../../Inspectable.js\";\nimport * as Stream from \"../../Stream.js\";\n/**\n * Constructs branded child process `ExitCode` values.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const ExitCode = /*#__PURE__*/Brand.nominal();\n/**\n * Constructs branded child process `ProcessId` values.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const ProcessId = /*#__PURE__*/Brand.nominal();\nconst HandleTypeId = \"~effect/ChildProcessSpawner/ChildProcessHandle\";\nconst HandleProto = {\n [HandleTypeId]: HandleTypeId,\n ...Inspectable.BaseProto,\n toJSON() {\n return {\n _id: \"ChildProcessHandle\",\n pid: this.pid\n };\n }\n};\n/**\n * Constructs a new `ChildProcessHandle`.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const makeHandle = params => Object.assign(Object.create(HandleProto), params);\n/**\n * Creates a `ChildProcessSpawner` service from a `spawn` function, deriving\n * helpers for exit codes and output collection from that implementation.\n *\n * @category models\n * @since 4.0.0\n */\nexport const make = spawn => {\n const streamString = (command, options) => spawn(command).pipe(Effect.map(handle => Stream.decodeText(options?.includeStderr === true ? handle.all : handle.stdout)), Stream.unwrap);\n const streamLines = (command, options) => Stream.splitLines(streamString(command, options));\n return ChildProcessSpawner.of({\n spawn,\n exitCode: command => Effect.scoped(Effect.flatMap(spawn(command), handle => handle.exitCode)),\n streamString,\n streamLines,\n lines: (command, options) => Stream.runCollect(streamLines(command, options)),\n string: (command, options) => Stream.mkString(streamString(command, options))\n });\n};\n/**\n * Service tag for child process spawning.\n *\n * @category services\n * @since 4.0.0\n */\nexport class ChildProcessSpawner extends /*#__PURE__*/Context.Service()(\"effect/process/ChildProcessSpawner\") {}\n//# sourceMappingURL=ChildProcessSpawner.js.map",
|
|
6
|
+
"/**\n * An Effect-native module for working with child processes.\n *\n * This module uses an AST-based approach where commands are built first\n * using `make` and `pipeTo`, then executed using `spawn`.\n *\n * **Example** (Spawning and piping commands)\n *\n * ```ts\n * import { Effect, Stream } from \"effect\"\n * import { NodeServices } from \"@effect/platform-node\"\n * import { ChildProcess } from \"effect/unstable/process\"\n *\n * // Build a command\n * const command = ChildProcess.make`echo \"hello world\"`\n *\n * // Spawn and collect output\n * const program = Effect.gen(function*() {\n * // You can `yield*` a command, which calls `ChildProcess.spawn`\n * const handle = yield* command\n * const chunks = yield* Stream.runCollect(handle.stdout)\n * const exitCode = yield* handle.exitCode\n * return { chunks, exitCode }\n * }).pipe(Effect.scoped, Effect.provide(NodeServices.layer))\n *\n * // With options\n * const withOptions = ChildProcess.make({ cwd: \"/tmp\" })`ls -la`\n *\n * // Piping commands\n * const pipeline = ChildProcess.make`cat package.json`.pipe(\n * ChildProcess.pipeTo(ChildProcess.make`grep name`)\n * )\n *\n * // Spawn the pipeline\n * const pipelineProgram = Effect.gen(function*() {\n * const handle = yield* pipeline\n * const chunks = yield* Stream.runCollect(handle.stdout)\n * return chunks\n * }).pipe(Effect.scoped, Effect.provide(NodeServices.layer))\n * ```\n *\n * @since 4.0.0\n */\nimport * as Context from \"../../Context.js\";\nimport * as Effectable from \"../../Effectable.js\";\nimport { dual } from \"../../Function.js\";\nimport * as Predicate from \"../../Predicate.js\";\nimport { ChildProcessSpawner } from \"./ChildProcessSpawner.js\";\nconst TypeId = \"~effect/unstable/process/ChildProcess\";\n// =============================================================================\n// Constructors\n// =============================================================================\nconst Proto = {\n ... /*#__PURE__*/Effectable.Prototype({\n label: \"Command\",\n evaluate(fiber) {\n return Context.getUnsafe(fiber.context, ChildProcessSpawner).spawn(this);\n }\n }),\n [TypeId]: TypeId\n};\n/**\n * Checks whether a value is a `Command`.\n *\n * @category guards\n * @since 4.0.0\n */\nexport const isCommand = u => Predicate.hasProperty(u, TypeId);\n/**\n * Checks whether a command is a `StandardCommand`.\n *\n * @category guards\n * @since 4.0.0\n */\nexport const isStandardCommand = command => command._tag === \"StandardCommand\";\n/**\n * Checks whether a command is a `PipedCommand`.\n *\n * @category guards\n * @since 4.0.0\n */\nexport const isPipedCommand = command => command._tag === \"PipedCommand\";\nconst makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto), {\n _tag: \"StandardCommand\",\n command,\n args,\n options\n});\nconst makePipedCommand = (left, right, options = {}) => Object.assign(Object.create(Proto), {\n _tag: \"PipedCommand\",\n left,\n right,\n options\n});\n/**\n * Create a command from a template literal, options + template, or array form.\n *\n * **Details**\n *\n * This function supports three calling conventions:\n * 1. Template literal: `make\\`npm run build\\``\n * 2. Options + template literal: `make({ cwd: \"/app\" })\\`npm run build\\``\n * 3. Array form: `make(\"npm\", [\"run\", \"build\"], options?)`\n *\n * Template literals are not parsed until execution time, allowing parsing\n * errors to flow through Effect's error channel.\n *\n * **Example** (Creating commands)\n *\n * ```ts\n * import { ChildProcess } from \"effect/unstable/process\"\n *\n * // Template literal form\n * const cmd1 = ChildProcess.make`echo \"hello\"`\n *\n * // With options\n * const cmd2 = ChildProcess.make({ cwd: \"/tmp\" })`ls -la`\n *\n * // Array form\n * const cmd3 = ChildProcess.make(\"git\", [\"status\"])\n * ```\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = function make(...args) {\n // Template literal form: make`command`\n if (isTemplateString(args[0])) {\n const [templates, ...expressions] = args;\n const tokens = parseTemplates(templates, expressions);\n return makeStandardCommand(tokens[0] ?? \"\", tokens.slice(1), {});\n }\n // Options form: make({ cwd: \"/tmp\" })`command`\n if (typeof args[0] === \"object\" && !Array.isArray(args[0]) && !isTemplateString(args[0])) {\n const options = args[0];\n return function (templates, ...expressions) {\n const tokens = parseTemplates(templates, expressions);\n return makeStandardCommand(tokens[0] ?? \"\", tokens.slice(1), options);\n };\n }\n // Standard form without arguments: make(\"command\", options?)\n if (typeof args[0] === \"string\" && !Array.isArray(args[1])) {\n const [command, options = {}] = args;\n return makeStandardCommand(command, [], options);\n }\n // Standard form with arguments: make(\"command\", [\"arg1\", \"arg2\"], options?)\n const [command, cmdArgs = [], options = {}] = args;\n return makeStandardCommand(command, cmdArgs, options);\n};\n/**\n * Pipes the output of one command to the input of another.\n *\n * **Details**\n *\n * By default, pipes `stdout` from the source to `stdin` of the destination.\n * Use the `options` parameter to customize which streams are connected.\n *\n * **Example** (Piping command output)\n *\n * ```ts\n * import { ChildProcess } from \"effect/unstable/process\"\n *\n * // Pipe stdout (default)\n * const pipeline1 = ChildProcess.make`cat file.txt`.pipe(\n * ChildProcess.pipeTo(ChildProcess.make`grep pattern`)\n * )\n *\n * // Pipe stderr instead of stdout\n * const pipeline2 = ChildProcess.make`my-program`.pipe(\n * ChildProcess.pipeTo(ChildProcess.make`grep error`, { from: \"stderr\" })\n * )\n *\n * // Pipe combined stdout and stderr\n * const pipeline3 = ChildProcess.make`my-program`.pipe(\n * ChildProcess.pipeTo(ChildProcess.make`tee output.log`, { from: \"all\" })\n * )\n * ```\n *\n * @category combinators\n * @since 4.0.0\n */\nexport const pipeTo = /*#__PURE__*/dual(args => isCommand(args[0]) && isCommand(args[1]), (self, that, options) => makePipedCommand(self, that, options ?? {}));\n/**\n * Prepends another command to a command.\n *\n * **Details**\n *\n * For pipelines, only the leftmost command is prefixed.\n *\n * **Example** (Prefixing commands)\n *\n * ```ts\n * import { ChildProcess } from \"effect/unstable/process\"\n *\n * const command = ChildProcess.make`echo \"foo\"`\n *\n * const prefixed = command.pipe(\n * ChildProcess.prefix`time`\n * )\n *\n * // now prefixed will execute `time echo \"foo\"`\n * ```\n *\n * @category combinators\n * @since 4.0.0\n */\nexport const prefix = function prefix(...args) {\n if (isCommand(args[0]) && args.length > 1) {\n const [self, ...rest] = args;\n const prefixSpec = parsePrefixArgs(rest);\n return applyPrefix(self, prefixSpec);\n }\n const prefixSpec = parsePrefixArgs(args);\n return self => applyPrefix(self, prefixSpec);\n};\nconst parsePrefixArgs = args => {\n if (isTemplateString(args[0])) {\n const [templates, ...expressions] = args;\n const tokens = parseTemplates(templates, expressions);\n return {\n command: tokens[0] ?? \"\",\n args: tokens.slice(1)\n };\n }\n const [command, cmdArgs = []] = args;\n return {\n command,\n args: cmdArgs\n };\n};\nconst applyPrefix = (self, prefixSpec) => {\n switch (self._tag) {\n case \"StandardCommand\":\n {\n return makeStandardCommand(prefixSpec.command, [...prefixSpec.args, self.command, ...self.args], self.options);\n }\n case \"PipedCommand\":\n {\n return makePipedCommand(applyPrefix(self.left, prefixSpec), self.right, self.options);\n }\n }\n};\n/**\n * Sets the current working directory for a command.\n *\n * **Details**\n *\n * For pipelines, applies to each command in the pipeline.\n *\n * **Example** (Setting command working directories)\n *\n * ```ts\n * import { ChildProcess } from \"effect/unstable/process\"\n *\n * const cmd = ChildProcess.make`ls -la`.pipe(\n * ChildProcess.setCwd(\"/tmp\")\n * )\n * ```\n *\n * @category combinators\n * @since 4.0.0\n */\nexport const setCwd = /*#__PURE__*/dual(2, (self, cwd) => {\n switch (self._tag) {\n case \"StandardCommand\":\n {\n return makeStandardCommand(self.command, self.args, {\n ...self.options,\n cwd\n });\n }\n case \"PipedCommand\":\n {\n return makePipedCommand(setCwd(self.left, cwd), setCwd(self.right, cwd), self.options);\n }\n }\n});\n/**\n * Adds environment variables to a command, merging them with any existing\n * command environment and overriding duplicate keys.\n *\n * **Details**\n *\n * For pipelines, applies to each command in the pipeline.\n *\n * **Example** (Setting command environment variables)\n *\n * ```ts\n * import { ChildProcess } from \"effect/unstable/process\"\n *\n * const cmd = ChildProcess.make`node script.js`.pipe(\n * ChildProcess.setEnv({ NODE_ENV: \"test\" })\n * )\n * ```\n *\n * @category combinators\n * @since 4.0.0\n */\nexport const setEnv = /*#__PURE__*/dual(2, (self, env) => {\n switch (self._tag) {\n case \"StandardCommand\":\n {\n const nextEnv = self.options.env === undefined ? env : {\n ...self.options.env,\n ...env\n };\n return makeStandardCommand(self.command, self.args, {\n ...self.options,\n env: nextEnv\n });\n }\n case \"PipedCommand\":\n {\n return makePipedCommand(setEnv(self.left, env), setEnv(self.right, env), self.options);\n }\n }\n});\nconst isTemplateString = u => Array.isArray(u) && \"raw\" in u && Array.isArray(u.raw);\n// =============================================================================\n// Utilities\n// =============================================================================\n/**\n * Parses an fd name like \"fd3\" to its numeric index.\n * Returns undefined if the name is invalid.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const parseFdName = name => {\n const match = /^fd(\\d+)$/.exec(name);\n if (match === null) return undefined;\n const fd = parseInt(match[1], 10);\n return fd >= 3 ? fd : undefined;\n};\n/**\n * Create an fd name from its numeric index.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const fdName = fd => `fd${fd}`;\n// =============================================================================\n// Template Parsing\n// =============================================================================\nconst parseTemplates = (templates, expressions) => {\n let tokens = [];\n for (const [index, template] of templates.entries()) {\n tokens = parseTemplate(templates, expressions, tokens, template, index);\n }\n return tokens;\n};\nconst parseTemplate = (templates, expressions, prevTokens, template, index) => {\n const rawTemplate = templates.raw[index];\n if (rawTemplate === undefined) {\n throw new Error(`Invalid backslash sequence: ${templates.raw[index]}`);\n }\n const {\n hasLeadingWhitespace,\n hasTrailingWhitespace,\n tokens\n } = splitByWhitespaces(template, rawTemplate);\n const nextTokens = concatTokens(prevTokens, tokens, hasLeadingWhitespace);\n if (index === expressions.length) {\n return nextTokens;\n }\n const expression = expressions[index];\n const expressionTokens = Array.isArray(expression) ? expression.map(expression => parseExpression(expression)) : [parseExpression(expression)];\n return concatTokens(nextTokens, expressionTokens, hasTrailingWhitespace);\n};\n/**\n * Convert valid expressions defined in a template string command (i.e. using\n * `${expression}` into strings.\n */\nconst parseExpression = expression => {\n const type = typeof expression;\n if (type === \"string\") {\n return expression; // Return strings directly\n }\n return String(expression); // Convert numbers to strings\n};\nconst DELIMITERS = /*#__PURE__*/new Set([\" \", \"\\t\", \"\\r\", \"\\n\"]);\n/**\n * Number of characters in backslash escape sequences: \\0 \\xXX or \\uXXXX\n * \\cX is allowed in RegExps but not in strings\n * Octal sequences are not allowed in strict mode\n */\nconst ESCAPE_LENGTH = {\n x: 3,\n u: 5\n};\n/**\n * Splits a template string by whitespace while also properly handling escape\n * sequences.\n *\n * As an example, let's review the following valid commands:\n *\n * ```ts\n * ChildProcess.exec`echo foo\\n bar`\n * // We should run `[\"echo\", \"foo\\n\", \"bar\"]`\n *\n * ChildProcess.exec`echo foo\n * bar`\n * // We should run `[\"echo\", \"foo\", \"bar]`\n * ```\n *\n * The problem is that when we evaluate the template string for both of the above\n * commands, we will end up with the same string \"echo foo\\n bar\".\n *\n * What we really want is to include the escaped character in the arguments for\n * the first command, since it was written explicitly by the user.\n *\n * This is why also having access to the raw template string is useful - in a\n * template string, there are two representations of the same string:\n * 1. `template` - The processed string (escape sequences are evaluated).\n * 2. `template.raw` - The raw string (escape sequences are literal).\n */\nconst splitByWhitespaces = (template, rawTemplate) => {\n if (rawTemplate.length === 0) {\n return {\n tokens: [],\n hasLeadingWhitespace: false,\n hasTrailingWhitespace: false\n };\n }\n const hasLeadingWhitespace = DELIMITERS.has(rawTemplate[0]);\n const tokens = [];\n // Given that escape sequences will have different lengths in the template\n // versus the raw template, we must maintain two indices:\n // - One for the index into the template string\n // - One for the index into the raw template string\n // We also maintain the current cursor position for where we are in the template\n let templateCursor = 0;\n for (let templateIndex = 0, rawIndex = 0; templateIndex < template.length; templateIndex += 1, rawIndex += 1) {\n // Use the raw template character to check for actual whitespace\n const rawCharacter = rawTemplate[rawIndex];\n if (DELIMITERS.has(rawCharacter)) {\n // Whitespace found, extract token from template if necessary\n if (templateCursor !== templateIndex) {\n tokens.push(template.slice(templateCursor, templateIndex));\n }\n // Advance the template start index to the current position\n templateCursor = templateIndex + 1;\n } else if (rawCharacter === \"\\\\\") {\n // Escape sequence detected, check the next raw character\n const nextRawCharacter = rawTemplate[rawIndex + 1];\n if (nextRawCharacter === \"\\n\") {\n // Handle `\\` character followed by a newline (i.e. a line continuation) by:\n // - Reversing the template index (backslash-newline is erased in template)\n // - Advancing the raw template index past the line continuation\n templateIndex -= 1;\n rawIndex += 1;\n } else if (nextRawCharacter === \"u\" && rawTemplate[rawIndex + 2] === \"{\") {\n // Handle variable-length unicode escape sequences (i.e. `\\u{1F600}`) by:\n // - Advancing the raw template index past the unicode escape sequence\n rawIndex = rawTemplate.indexOf(\"}\", rawIndex + 3);\n } else {\n // Advance raw template index past fixed-length escape sequences:\n // - \\n → 2 chars (backslash + n)\n // - \\t → 2 chars (backslash + t)\n // - \\xHH → 4 chars (backslash + x + H + H)\n // - \\uHHHH → 6 chars (backslash + u + H + H + H + H)\n rawIndex += ESCAPE_LENGTH[nextRawCharacter] ?? 1;\n }\n }\n }\n // Trailing whitespace only exists if the template cursor is equivalent to the\n // length of the template\n const hasTrailingWhitespace = templateCursor === template.length;\n // If we did not end with trailing whitespace, ensure the final token is added\n if (!hasTrailingWhitespace) {\n tokens.push(template.slice(templateCursor));\n }\n return {\n tokens,\n hasLeadingWhitespace,\n hasTrailingWhitespace\n };\n};\n/**\n * Concatenates two separate sets of string tokens together.\n *\n * If either set is empty or `isSeparated=false`, the last element of `prevTokens`\n * and the first element of `nextTokens` will be joined into a single token.\n */\nconst concatTokens = (prevTokens, nextTokens, isSeparated) => isSeparated || prevTokens.length === 0 || nextTokens.length === 0\n// Keep the previous and next tokens separate from one another\n? [...prevTokens, ...nextTokens]\n// Join the last token from the previous set and the first token from the next set\n: [...prevTokens.slice(0, -1), `${prevTokens.at(-1)}${nextTokens.at(0)}`, ...nextTokens.slice(1)];\n//# sourceMappingURL=ChildProcess.js.map",
|
|
7
|
+
"import * as Deferred from \"effect/Deferred\";\nimport * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as FileSystem from \"effect/FileSystem\";\nimport * as Layer from \"effect/Layer\";\nimport * as Path from \"effect/Path\";\nimport * as Predicate from \"effect/Predicate\";\nimport * as Sink from \"effect/Sink\";\nimport * as Stream from \"effect/Stream\";\nimport * as ChildProcess from \"effect/unstable/process/ChildProcess\";\nimport { ChildProcessSpawner, ExitCode, make as makeSpawner, makeHandle, ProcessId } from \"effect/unstable/process/ChildProcessSpawner\";\nimport * as NodeChildProcess from \"node:child_process\";\nimport { handleErrnoException } from \"./internal/utils.js\";\nimport * as NodeSink from \"./NodeSink.js\";\nimport * as NodeStream from \"./NodeStream.js\";\nconst toError = error => error instanceof globalThis.Error ? error : new globalThis.Error(String(error));\nconst toPlatformError = (method, error, command) => {\n const {\n commands\n } = flattenCommand(command);\n const commandStr = commands.reduce((acc, curr) => {\n const cmd = `${curr.command} ${curr.args.join(\" \")}`;\n return acc.length === 0 ? cmd : `${acc} | ${cmd}`;\n }, \"\");\n return handleErrnoException(\"ChildProcess\", method)(error, [commandStr]);\n};\nconst make = /*#__PURE__*/Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const resolveWorkingDirectory = Effect.fnUntraced(function* (options) {\n if (Predicate.isUndefined(options.cwd)) return undefined;\n // Validate that the specified directory is accessible\n yield* fs.access(options.cwd);\n return path.resolve(options.cwd);\n });\n const resolveEnvironment = options => {\n return options.extendEnv ? {\n ...globalThis.process.env,\n ...options.env\n } : options.env;\n };\n const inputToStdioOption = input => Stream.isStream(input) ? \"pipe\" : input;\n const outputToStdioOption = input => Sink.isSink(input) ? \"pipe\" : input;\n const resolveStdinOption = options => {\n const defaultConfig = {\n stream: \"pipe\",\n encoding: \"utf-8\",\n endOnDone: true\n };\n if (Predicate.isUndefined(options.stdin)) {\n return defaultConfig;\n }\n if (typeof options.stdin === \"string\") {\n return {\n ...defaultConfig,\n stream: options.stdin\n };\n }\n if (Stream.isStream(options.stdin)) {\n return {\n ...defaultConfig,\n stream: options.stdin\n };\n }\n return {\n stream: options.stdin.stream,\n encoding: options.stdin.encoding ?? defaultConfig.encoding,\n endOnDone: options.stdin.endOnDone ?? defaultConfig.endOnDone\n };\n };\n const resolveOutputOption = (options, streamName) => {\n const option = options[streamName];\n if (Predicate.isUndefined(option)) {\n return {\n stream: \"pipe\"\n };\n }\n if (typeof option === \"string\") {\n return {\n stream: option\n };\n }\n if (Sink.isSink(option)) {\n return {\n stream: option\n };\n }\n return {\n stream: option.stream\n };\n };\n const resolveAdditionalFds = options => {\n if (Predicate.isUndefined(options.additionalFds)) {\n return [];\n }\n const result = [];\n for (const [name, config] of Object.entries(options.additionalFds)) {\n const fd = ChildProcess.parseFdName(name);\n if (Predicate.isNotUndefined(fd)) {\n result.push({\n fd,\n config\n });\n }\n }\n // Sort by fd number to ensure correct ordering\n return result.sort((a, b) => a.fd - b.fd);\n };\n const buildStdioArray = (stdinConfig, stdoutConfig, stderrConfig, additionalFds) => {\n const stdio = [inputToStdioOption(stdinConfig.stream), outputToStdioOption(stdoutConfig.stream), outputToStdioOption(stderrConfig.stream)];\n if (additionalFds.length === 0) {\n return stdio;\n }\n // Find the maximum fd number to size the array correctly\n const maxFd = additionalFds.reduce((max, {\n fd\n }) => Math.max(max, fd), 2);\n // Fill gaps with \"ignore\"\n for (let i = 3; i <= maxFd; i++) {\n stdio[i] = \"ignore\";\n }\n // Set up additional fds as \"pipe\"\n for (const {\n fd\n } of additionalFds) {\n stdio[fd] = \"pipe\";\n }\n return stdio;\n };\n const setupAdditionalFds = Effect.fnUntraced(function* (command, childProcess, additionalFds) {\n if (additionalFds.length === 0) {\n return {\n getInputFd: () => Sink.drain,\n getOutputFd: () => Stream.empty\n };\n }\n const inputSinks = new Map();\n const outputStreams = new Map();\n for (const {\n config,\n fd\n } of additionalFds) {\n const nodeStream = childProcess.stdio[fd];\n switch (config.type) {\n case \"input\":\n {\n // Create a sink to write to for input file descriptors\n let sink = Sink.drain;\n if (nodeStream && \"write\" in nodeStream) {\n sink = NodeSink.fromWritable({\n evaluate: () => nodeStream,\n onError: error => toPlatformError(`fromWritable(fd${fd})`, toError(error), command)\n });\n }\n // If user provided a stream, pipe it into the sink\n if (config.stream) {\n yield* Effect.forkScoped(Stream.run(config.stream, sink));\n }\n inputSinks.set(fd, sink);\n break;\n }\n case \"output\":\n {\n // Create a stream to read from for output file descriptors\n let stream = Stream.empty;\n if (nodeStream && \"read\" in nodeStream) {\n stream = NodeStream.fromReadable({\n evaluate: () => nodeStream,\n onError: error => toPlatformError(`fromReadable(fd${fd})`, toError(error), command)\n });\n }\n // If user provided a sink, transduce the stream through it\n if (config.sink) {\n stream = Stream.transduce(stream, config.sink);\n }\n outputStreams.set(fd, stream);\n break;\n }\n }\n }\n return {\n getInputFd: fd => inputSinks.get(fd) ?? Sink.drain,\n getOutputFd: fd => outputStreams.get(fd) ?? Stream.empty\n };\n });\n const setupChildStdin = (command, childProcess, config) => Effect.suspend(() => {\n // If the child process has a standard input stream, connect it to the\n // sink that will attached to the process handle\n let sink = Sink.drain;\n if (Predicate.isNotNull(childProcess.stdin)) {\n sink = NodeSink.fromWritable({\n evaluate: () => childProcess.stdin,\n onError: error => toPlatformError(\"fromWritable(stdin)\", toError(error), command),\n endOnDone: config.endOnDone,\n encoding: config.encoding\n });\n }\n // If the user provided a `Stream`, run it into the stdin sink\n if (Stream.isStream(config.stream)) {\n return Effect.as(Effect.forkScoped(Stream.run(config.stream, sink)), sink);\n }\n return Effect.succeed(sink);\n });\n const setupChildOutputStreams = (command, childProcess, stdoutConfig, stderrConfig) => {\n let stdout = childProcess.stdout ? NodeStream.fromReadable({\n evaluate: () => childProcess.stdout,\n onError: error => toPlatformError(\"fromReadable(stdout)\", toError(error), command)\n }) : Stream.empty;\n let stderr = childProcess.stderr ? NodeStream.fromReadable({\n evaluate: () => childProcess.stderr,\n onError: error => toPlatformError(\"fromReadable(stderr)\", toError(error), command)\n }) : Stream.empty;\n if (Sink.isSink(stdoutConfig.stream)) {\n stdout = Stream.transduce(stdout, stdoutConfig.stream);\n }\n if (Sink.isSink(stderrConfig.stream)) {\n stderr = Stream.transduce(stderr, stderrConfig.stream);\n }\n const all = Stream.merge(stdout, stderr);\n return {\n stdout,\n stderr,\n all\n };\n };\n const spawn = (command, spawnOptions) => Effect.callback(resume => {\n const deferred = Deferred.makeUnsafe();\n const handle = NodeChildProcess.spawn(command.command, command.args, spawnOptions);\n handle.on(\"error\", error => {\n resume(Effect.fail(toPlatformError(\"spawn\", error, command)));\n });\n handle.on(\"exit\", (...args) => {\n Deferred.doneUnsafe(deferred, Exit.succeed(args));\n });\n handle.on(\"spawn\", () => {\n resume(Effect.succeed([handle, deferred]));\n });\n return Effect.sync(() => {\n handle.kill(\"SIGTERM\");\n });\n });\n const killProcessGroup = (command, childProcess, signal) => {\n if (globalThis.process.platform === \"win32\") {\n return Effect.callback(resume => {\n NodeChildProcess.exec(`taskkill /pid ${childProcess.pid} /T /F`, error => {\n if (error) {\n resume(Effect.fail(toPlatformError(\"kill\", toError(error), command)));\n } else {\n resume(Effect.void);\n }\n });\n });\n }\n return Effect.try({\n try: () => {\n globalThis.process.kill(-childProcess.pid, signal);\n },\n catch: error => toPlatformError(\"kill\", toError(error), command)\n });\n };\n const killProcessGroupOnExit = (childProcess, signal) => {\n if (globalThis.process.platform === \"win32\") {\n NodeChildProcess.exec(`taskkill /pid ${childProcess.pid} /T /F`, () => {\n // ignore errors during best-effort cleanup\n });\n return;\n }\n try {\n globalThis.process.kill(-childProcess.pid, signal);\n } catch {\n // ignore errors during best-effort cleanup\n }\n };\n const killProcess = (command, childProcess, signal) => Effect.suspend(() => {\n const killed = childProcess.kill(signal);\n if (!killed) {\n const error = new globalThis.Error(\"Failed to kill child process\");\n return Effect.fail(toPlatformError(\"kill\", error, command));\n }\n return Effect.void;\n });\n const withTimeout = (childProcess, command, options) => kill => {\n const killSignal = options?.killSignal ?? \"SIGTERM\";\n return Predicate.isUndefined(options?.forceKillAfter) ? kill(command, childProcess, killSignal) : Effect.timeoutOrElse(kill(command, childProcess, killSignal), {\n duration: options.forceKillAfter,\n orElse: () => kill(command, childProcess, \"SIGKILL\")\n });\n };\n /**\n * Get the appropriate source stream from a process handle based on the\n * `from` pipe option.\n */\n const getSourceStream = (handle, from) => {\n const fromOption = from ?? \"stdout\";\n switch (fromOption) {\n case \"stdout\":\n return handle.stdout;\n case \"stderr\":\n return handle.stderr;\n case \"all\":\n return handle.all;\n default:\n {\n // Handle fd3, fd4, etc.\n const fd = ChildProcess.parseFdName(fromOption);\n if (Predicate.isNotUndefined(fd)) {\n return handle.getOutputFd(fd);\n }\n // Fallback to stdout for invalid fd names\n return handle.stdout;\n }\n }\n };\n const spawnCommand = Effect.fnUntraced(function* (cmd) {\n switch (cmd._tag) {\n case \"StandardCommand\":\n {\n const stdinConfig = resolveStdinOption(cmd.options);\n const stdoutConfig = resolveOutputOption(cmd.options, \"stdout\");\n const stderrConfig = resolveOutputOption(cmd.options, \"stderr\");\n const resolvedAdditionalFds = resolveAdditionalFds(cmd.options);\n let isReferenced = true;\n let cleanupOnNonZeroExit = false;\n const cwd = yield* resolveWorkingDirectory(cmd.options);\n const env = resolveEnvironment(cmd.options);\n const stdio = buildStdioArray(stdinConfig, stdoutConfig, stderrConfig, resolvedAdditionalFds);\n const [childProcess, exitSignal] = yield* Effect.acquireRelease(spawn(cmd, {\n cwd,\n env,\n stdio,\n detached: cmd.options.detached ?? process.platform !== \"win32\",\n shell: cmd.options.shell\n }), Effect.fnUntraced(function* ([childProcess, exitSignal]) {\n const exited = yield* Deferred.isDone(exitSignal);\n const killWithTimeout = withTimeout(childProcess, cmd, cmd.options);\n if (exited) {\n // Process already exited, check if children need cleanup\n const [code] = yield* Deferred.await(exitSignal);\n if (code !== 0 && Predicate.isNotNull(code)) {\n // Non-zero exit code ,attempt to clean up process group\n return yield* Effect.ignore(killWithTimeout(killProcessGroup));\n }\n return yield* Effect.void;\n }\n if (!isReferenced) {\n return yield* Effect.void;\n }\n // Process is still running, kill it\n return yield* killWithTimeout((command, childProcess, signal) => Effect.catch(killProcessGroup(command, childProcess, signal), () => killProcess(command, childProcess, signal))).pipe(Effect.andThen(Deferred.await(exitSignal)), Effect.ignore);\n }));\n const pid = ProcessId(childProcess.pid);\n childProcess.on(\"exit\", code => {\n if (cleanupOnNonZeroExit && code !== 0 && Predicate.isNotNull(code)) {\n killProcessGroupOnExit(childProcess, cmd.options.killSignal ?? \"SIGTERM\");\n }\n });\n const reref = Effect.sync(() => {\n if (!isReferenced) {\n childProcess.ref();\n isReferenced = true;\n cleanupOnNonZeroExit = false;\n }\n });\n const unref = Effect.sync(() => {\n if (isReferenced) {\n childProcess.unref();\n isReferenced = false;\n cleanupOnNonZeroExit = true;\n }\n return reref;\n });\n const stdin = yield* setupChildStdin(cmd, childProcess, stdinConfig);\n const {\n all,\n stderr,\n stdout\n } = setupChildOutputStreams(cmd, childProcess, stdoutConfig, stderrConfig);\n const {\n getInputFd,\n getOutputFd\n } = yield* setupAdditionalFds(cmd, childProcess, resolvedAdditionalFds);\n const isRunning = Effect.map(Deferred.isDone(exitSignal), done => !done);\n const exitCode = Effect.flatMap(Deferred.await(exitSignal), ([code, signal]) => {\n if (Predicate.isNotNull(code)) {\n return Effect.succeed(ExitCode(code));\n }\n // If code is `null`, then `signal` must be defined. See the NodeJS\n // documentation for the `\"exit\"` event on a `child_process`.\n // https://nodejs.org/api/child_process.html#child_process_event_exit\n const error = new globalThis.Error(`Process interrupted due to receipt of signal: '${signal}'`);\n return Effect.fail(toPlatformError(\"exitCode\", error, cmd));\n });\n const kill = options => {\n const killWithTimeout = withTimeout(childProcess, cmd, options);\n return killWithTimeout((command, childProcess, signal) => Effect.catch(killProcessGroup(command, childProcess, signal), () => killProcess(command, childProcess, signal))).pipe(Effect.andThen(Deferred.await(exitSignal)), Effect.asVoid);\n };\n return makeHandle({\n pid,\n exitCode,\n isRunning,\n kill,\n stdin,\n stdout,\n stderr,\n all,\n getInputFd,\n getOutputFd,\n unref\n });\n }\n case \"PipedCommand\":\n {\n const {\n commands,\n pipeOptions\n } = flattenCommand(cmd);\n const [root, ...pipeline] = commands;\n const handles = [yield* spawnCommand(root)];\n for (let i = 0; i < pipeline.length; i++) {\n const command = pipeline[i];\n const options = pipeOptions[i] ?? {};\n const stdinConfig = resolveStdinOption(command.options);\n // Get the appropriate stream from the source based on `from` option\n const sourceStream = Stream.unwrap(Effect.succeed(getSourceStream(handles[handles.length - 1], options.from)));\n // Determine where to pipe: stdin or custom fd\n const toOption = options.to ?? \"stdin\";\n if (toOption === \"stdin\") {\n // Pipe to stdin (default behavior)\n handles.push(yield* spawnCommand(ChildProcess.make(command.command, command.args, {\n ...command.options,\n stdin: {\n ...stdinConfig,\n stream: sourceStream\n }\n })));\n } else {\n // Pipe to custom fd (fd3, fd4, etc.)\n const fd = ChildProcess.parseFdName(toOption);\n if (Predicate.isNotUndefined(fd)) {\n const fdName = ChildProcess.fdName(fd);\n const existingFds = command.options.additionalFds ?? {};\n handles.push(yield* spawnCommand(ChildProcess.make(command.command, command.args, {\n ...command.options,\n additionalFds: {\n ...existingFds,\n [fdName]: {\n type: \"input\",\n stream: sourceStream\n }\n }\n })));\n } else {\n // Invalid fd name, fall back to stdin\n handles.push(yield* spawnCommand(ChildProcess.make(command.command, command.args, {\n ...command.options,\n stdin: {\n ...stdinConfig,\n stream: sourceStream\n }\n })));\n }\n }\n }\n const handle = handles[handles.length - 1];\n const unref = Effect.gen(function* () {\n const rerefs = [];\n for (const handle of handles) {\n rerefs.push(yield* handle.unref);\n }\n return Effect.forEach([...rerefs].reverse(), reref => reref, {\n discard: true\n });\n });\n return makeHandle({\n pid: handle.pid,\n exitCode: handle.exitCode,\n isRunning: handle.isRunning,\n kill: handle.kill,\n stdin: handle.stdin,\n stdout: handle.stdout,\n stderr: handle.stderr,\n all: handle.all,\n getInputFd: handle.getInputFd,\n getOutputFd: handle.getOutputFd,\n unref\n });\n }\n }\n });\n return makeSpawner(spawnCommand);\n});\n/**\n * Layer that provides the `NodeChildProcessSpawner` implementation.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/Layer.effect(ChildProcessSpawner, make);\n/**\n * Flattens a `Command` into an array of `StandardCommand`s along with pipe\n * options for each connection.\n *\n * @category transforming\n * @since 4.0.0\n */\nexport const flattenCommand = command => {\n const commands = [];\n const pipeOptions = [];\n const flatten = cmd => {\n switch (cmd._tag) {\n case \"StandardCommand\":\n {\n commands.push(cmd);\n break;\n }\n case \"PipedCommand\":\n {\n // Recursively flatten left side first\n flatten(cmd.left);\n // Store the pipe options for this connection\n pipeOptions.push(cmd.options);\n // Then flatten right side\n flatten(cmd.right);\n break;\n }\n }\n };\n flatten(command);\n // The commands array is guaranteed to be non-empty since we always have at\n // least one command in the input. We validate this at runtime and return a\n // properly typed tuple.\n if (commands.length === 0) {\n // This should never happen given a valid Command input\n throw new Error(\"flattenCommand produced empty commands array\");\n }\n const [first, ...rest] = commands;\n const nonEmptyCommands = [first, ...rest];\n return {\n commands: nonEmptyCommands,\n pipeOptions\n };\n};\n//# sourceMappingURL=NodeChildProcessSpawner.js.map",
|
|
8
|
+
"import * as PlatformError from \"effect/PlatformError\";\n/** @internal */\nexport const handleErrnoException = (module, method) => (err, [path]) => {\n let reason = \"Unknown\";\n switch (err.code) {\n case \"ENOENT\":\n reason = \"NotFound\";\n break;\n case \"EACCES\":\n reason = \"PermissionDenied\";\n break;\n case \"EEXIST\":\n reason = \"AlreadyExists\";\n break;\n case \"EISDIR\":\n reason = \"BadResource\";\n break;\n case \"ENOTDIR\":\n reason = \"BadResource\";\n break;\n case \"EBUSY\":\n reason = \"Busy\";\n break;\n case \"ELOOP\":\n reason = \"BadResource\";\n break;\n }\n return PlatformError.systemError({\n _tag: reason,\n module,\n method,\n pathOrDescriptor: path,\n syscall: err.syscall,\n cause: err\n });\n};\n//# sourceMappingURL=utils.js.map",
|
|
9
|
+
"import * as Cause from \"effect/Cause\";\nimport * as Channel from \"effect/Channel\";\nimport * as Effect from \"effect/Effect\";\nimport { identity } from \"effect/Function\";\nimport * as Pull from \"effect/Pull\";\nimport * as Sink from \"effect/Sink\";\n/**\n * Creates a `Sink` that writes chunks to a Node writable stream, respecting\n * backpressure, mapping writable errors with `onError`, and ending the stream\n * on completion unless `endOnDone` is `false`.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const fromWritable = options => Sink.fromChannel(Channel.mapDone(fromWritableChannel(options), _ => [_]));\n/**\n * Creates a `Channel` that pulls chunks from upstream and writes them to a\n * Node writable stream, respecting backpressure and optionally ending the\n * writable when upstream is done.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const fromWritableChannel = options => Channel.fromTransform(pull => {\n const writable = options.evaluate();\n return Effect.succeed(pullIntoWritable({\n ...options,\n writable,\n pull\n }));\n});\n/**\n * Writes Effect chunks into a Node writable stream.\n *\n * **When to use**\n *\n * Use to implement custom Node stream adapters that already have an upstream\n * pull and need direct control over a writable stream.\n *\n * **Details**\n *\n * The loop waits for `drain` when needed, fails on writable errors, and ends\n * the writable on upstream completion unless `endOnDone` is `false`.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const pullIntoWritable = options => options.pull.pipe(Effect.flatMap(chunk => {\n let i = 0;\n return Effect.callback(function loop(resume) {\n for (; i < chunk.length;) {\n const success = options.writable.write(chunk[i++], options.encoding);\n if (!success) {\n options.writable.once(\"drain\", () => loop(resume));\n return;\n }\n }\n resume(Effect.void);\n });\n}), Effect.forever({\n disableYield: true\n}), Effect.raceFirst(Effect.callback(resume => {\n const onError = error => resume(Effect.fail(options.onError(error)));\n options.writable.once(\"error\", onError);\n return Effect.sync(() => {\n options.writable.off(\"error\", onError);\n });\n})), options.endOnDone !== false ? Pull.catchDone(_ => {\n if (\"closed\" in options.writable && options.writable.closed) {\n return Cause.done(_);\n }\n return Effect.callback(resume => {\n options.writable.once(\"finish\", () => resume(Cause.done(_)));\n options.writable.end();\n });\n}) : identity);\n//# sourceMappingURL=NodeSink.js.map",
|
|
10
|
+
"/**\n * Adapters between Node streams and Effect streams, channels, and readables.\n *\n * This module is the stream boundary for Node APIs: wrap `Readable` or\n * `Duplex` values as Effect `Stream`s and `Channel`s, pipe an Effect stream\n * through a Node duplex transform, expose an Effect `Stream` back to Node as a\n * `Readable`, or collect bounded readable payloads into strings, array\n * buffers, and `Uint8Array`s. Common sources include files, HTTP bodies, child\n * process stdio, sockets, and compression or crypto transforms.\n *\n * **Mental model**\n *\n * Read adapters pull from Node's readable side into Effect. Duplex adapters\n * write upstream Effect chunks to Node while reading transformed chunks back.\n * `toReadable` runs an Effect stream from the caller's context, while\n * `toReadableNever` is for streams that need no services.\n *\n * **Gotchas**\n *\n * Node backpressure is preserved: writes pause until `drain` before more input\n * is pulled. Readables are destroyed on scope finalization by default, and\n * duplex writable sides are ended when upstream completes unless configured\n * otherwise. For externally owned or long-lived streams, choose `closeOnDone`\n * and `endOnDone` deliberately; for collection helpers, set `maxBytes` when\n * input size is not already bounded.\n *\n * @since 4.0.0\n */\nimport * as Arr from \"effect/Array\";\nimport * as Cause from \"effect/Cause\";\nimport * as Channel from \"effect/Channel\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Fiber from \"effect/Fiber\";\nimport { dual } from \"effect/Function\";\nimport * as Latch from \"effect/Latch\";\nimport * as MutableRef from \"effect/MutableRef\";\nimport * as Pull from \"effect/Pull\";\nimport * as Scope from \"effect/Scope\";\nimport * as Stream from \"effect/Stream\";\nimport { Readable } from \"node:stream\";\nimport { pullIntoWritable } from \"./NodeSink.js\";\n/**\n * Converts a Node readable stream into an Effect `Stream`, reading chunks with\n * an optional chunk size, mapping stream errors with `onError`, and destroying\n * the readable on completion unless `closeOnDone` is `false`.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const fromReadable = options => Stream.fromChannel(fromReadableChannel(options));\n/**\n * Creates a `Channel` that pulls chunks from a Node readable stream, mapping\n * errors with `onError` and destroying the readable on completion unless\n * `closeOnDone` is `false`.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const fromReadableChannel = options => Channel.fromTransform((_, scope) => readableToPullUnsafe({\n scope,\n readable: options.evaluate(),\n onError: options.onError ?? defaultOnError,\n chunkSize: options.chunkSize,\n closeOnDone: options.closeOnDone\n}));\n/**\n * Creates a `Channel` over a Node `Duplex`, writing upstream chunks with\n * backpressure while emitting chunks read from the duplex and optionally ending\n * the writable side when upstream completes.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const fromDuplex = options => Channel.fromTransform((upstream, scope) => {\n const duplex = options.evaluate();\n const exit = MutableRef.make(undefined);\n return pullIntoWritable({\n pull: upstream,\n writable: duplex,\n onError: options.onError ?? defaultOnError,\n endOnDone: options.endOnDone,\n encoding: options.encoding\n }).pipe(Effect.catchCause(cause => {\n if (Pull.isDoneCause(cause)) return Effect.void;\n exit.current = Exit.failCause(cause);\n return Effect.void;\n }), Effect.forkIn(scope), Effect.flatMap(() => readableToPullUnsafe({\n scope,\n exit,\n readable: duplex,\n onError: options.onError ?? defaultOnError,\n chunkSize: options.chunkSize\n })));\n});\n/**\n * Pipes an Effect `Stream` through a Node `Duplex`, writing the stream's\n * chunks to the duplex and emitting chunks read back from it.\n *\n * @category combinators\n * @since 4.0.0\n */\nexport const pipeThroughDuplex = /*#__PURE__*/dual(2, (self, options) => Stream.pipeThroughChannelOrFail(self, fromDuplex(options)));\n/**\n * Pipes a stream of strings or bytes through a Node `Duplex` using default\n * options and `Cause.UnknownError` for stream failures.\n *\n * @category combinators\n * @since 4.0.0\n */\nexport const pipeThroughSimple = /*#__PURE__*/dual(2, (self, duplex) => pipeThroughDuplex(self, {\n evaluate: duplex\n}));\n/**\n * Converts an Effect `Stream` into a Node `Readable`, using the caller's\n * Effect context to run the stream and destroying the readable if the stream\n * fails.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const toReadable = stream => Effect.map(Effect.context(), context => new StreamAdapter(context, stream));\n/**\n * Converts a service-free Effect `Stream` into a Node `Readable` using an\n * empty Effect context.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const toReadableNever = stream => new StreamAdapter(Context.empty(), stream);\n/**\n * Consumes a Node readable stream into a string using the selected encoding,\n * failing through `onError` on stream errors or when `maxBytes` is exceeded\n * and destroying the stream on interruption or failure.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const toString = (readable, options) => {\n const maxBytesNumber = options?.maxBytes ? Number(options.maxBytes) : undefined;\n const onError = options?.onError ?? defaultOnError;\n const encoding = options?.encoding ?? \"utf8\";\n return Effect.callback(resume => {\n const stream = readable();\n stream.setEncoding(encoding);\n stream.once(\"error\", err => {\n if (\"closed\" in stream && !stream.closed) {\n stream.destroy();\n }\n resume(Effect.fail(onError(err)));\n });\n stream.once(\"error\", err => {\n resume(Effect.fail(onError(err)));\n });\n let string = \"\";\n let bytes = 0;\n stream.once(\"end\", () => {\n resume(Effect.succeed(string));\n });\n stream.on(\"data\", chunk => {\n string += chunk;\n bytes += Buffer.byteLength(chunk);\n if (maxBytesNumber && bytes > maxBytesNumber) {\n resume(Effect.fail(onError(new Error(\"maxBytes exceeded\"))));\n }\n });\n return Effect.sync(() => {\n if (\"closed\" in stream && !stream.closed) {\n stream.destroy();\n }\n });\n });\n};\n/**\n * Consumes a Node readable stream into an `ArrayBuffer`, failing through\n * `onError` on stream errors or when `maxBytes` is exceeded and destroying the\n * stream on interruption or failure.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const toArrayBuffer = (readable, options) => {\n const maxBytesNumber = options?.maxBytes ? Number(options.maxBytes) : undefined;\n const onError = options?.onError ?? defaultOnError;\n return Effect.callback(resume => {\n const stream = readable();\n const buffers = [];\n let bytes = 0;\n stream.once(\"error\", err => {\n if (\"closed\" in stream && !stream.closed) {\n stream.destroy();\n }\n resume(Effect.fail(onError(err)));\n });\n stream.once(\"end\", () => {\n const buffer = buffers.length === 1 ? buffers[0] : Buffer.concat(buffers);\n if (buffer.byteOffset === 0 && buffer.buffer.byteLength === buffer.byteLength) {\n return resume(Effect.succeed(buffer.buffer));\n }\n resume(Effect.succeed(buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength)));\n });\n stream.on(\"data\", chunk => {\n buffers.push(chunk);\n bytes += chunk.length;\n if (maxBytesNumber && bytes > maxBytesNumber) {\n resume(Effect.fail(onError(new Error(\"maxBytes exceeded\"))));\n }\n });\n return Effect.sync(() => {\n if (\"closed\" in stream && !stream.closed) {\n stream.destroy();\n }\n });\n });\n};\n/**\n * Consumes a Node readable stream into a `Uint8Array`, using the same error\n * mapping and `maxBytes` handling as `toArrayBuffer`.\n *\n * @category converting\n * @since 4.0.0\n */\nexport const toUint8Array = (readable, options) => Effect.map(toArrayBuffer(readable, options), buffer => new Uint8Array(buffer));\n// ----------------------------------------------------------------------------\n// internal\n// ----------------------------------------------------------------------------\nconst readableToPullUnsafe = options => {\n const readable = options.readable;\n if (readable.readableEnded) return Effect.succeed(Cause.done());\n const closeOnDone = options.closeOnDone ?? true;\n const exit = options.exit ?? MutableRef.make(undefined);\n const latch = Latch.makeUnsafe(false);\n function onReadable() {\n latch.openUnsafe();\n }\n function onError(error) {\n exit.current = Exit.fail(options.onError(error));\n latch.openUnsafe();\n }\n function onEnd() {\n exit.current = Exit.fail(Cause.Done());\n latch.openUnsafe();\n }\n readable.on(\"readable\", onReadable);\n readable.once(\"error\", onError);\n readable.once(\"end\", onEnd);\n const pull = Effect.suspend(function loop() {\n let item = options.readable.read(options.chunkSize);\n if (item === null) {\n if (exit.current) {\n return exit.current;\n }\n latch.closeUnsafe();\n return Effect.flatMap(latch.await, loop);\n }\n const chunk = Arr.of(item);\n while (true) {\n item = options.readable.read(options.chunkSize);\n if (item === null) break;\n chunk.push(item);\n }\n return Effect.succeed(chunk);\n });\n return Effect.as(Scope.addFinalizer(options.scope, Effect.sync(() => {\n readable.off(\"readable\", onReadable);\n readable.off(\"error\", onError);\n readable.off(\"end\", onEnd);\n if (closeOnDone && \"closed\" in options.readable && !options.readable.closed) {\n options.readable.destroy();\n }\n })), pull);\n};\nclass StreamAdapter extends Readable {\n readLatch;\n fiber = undefined;\n constructor(context, stream) {\n super({});\n this.readLatch = Latch.makeUnsafe(false);\n this.fiber = Stream.runForEachArray(stream, chunk => this.readLatch.whenOpen(Effect.sync(() => {\n this.readLatch.closeUnsafe();\n for (let i = 0; i < chunk.length; i++) {\n const item = chunk[i];\n if (typeof item === \"string\") {\n this.push(item, \"utf8\");\n } else {\n this.push(item);\n }\n }\n }))).pipe(this.readLatch.whenOpen, Effect.provideContext(context), Effect.runFork);\n this.fiber.addObserver(exit => {\n this.fiber = undefined;\n if (Exit.isSuccess(exit)) {\n this.push(null);\n } else {\n this.destroy(Cause.squash(exit.cause));\n }\n });\n }\n _read(_size) {\n this.readLatch.openUnsafe();\n }\n _destroy(error, callback) {\n if (!this.fiber) {\n return callback(error);\n }\n Effect.runFork(Fiber.interrupt(this.fiber)).addObserver(exit => {\n callback(exit._tag === \"Failure\" ? Cause.squash(exit.cause) : error);\n });\n }\n}\nconst defaultOnError = error => new Cause.UnknownError(error);\n//# sourceMappingURL=NodeStream.js.map",
|
|
11
|
+
"/**\n * The `Crypto` module provides a platform-agnostic service for cryptographic\n * operations. Runtime packages such as `@effect/platform-node`,\n * `@effect/platform-bun`, and `@effect/platform-browser` provide concrete\n * implementations backed by the host platform's cryptography APIs.\n *\n * Use `Crypto` for cryptographic randomness, UUID generation, random values,\n * and message digests. The base `Random` service is not cryptographically\n * secure unless you replace it with a cryptographically secure implementation.\n *\n * **Example** (Providing a test Crypto service)\n *\n * ```ts\n * import { Console, Crypto, Effect, Layer } from \"effect\"\n *\n * const TestCrypto = Layer.succeed(\n * Crypto.Crypto,\n * Crypto.make({\n * randomBytes: (size) => new Uint8Array(size),\n * digest: (_algorithm, data) => Effect.succeed(data)\n * })\n * )\n *\n * const program = Effect.gen(function*() {\n * const crypto = yield* Crypto.Crypto\n * const id = yield* crypto.randomUUIDv4\n * yield* Console.log(`Created id: ${id}`)\n * })\n *\n * Effect.runPromise(Effect.provide(program, TestCrypto))\n * ```\n *\n * **Example** (Generating random bytes)\n *\n * ```ts\n * import { Crypto, Effect, Layer } from \"effect\"\n *\n * const TestCrypto = Layer.succeed(\n * Crypto.Crypto,\n * Crypto.make({\n * randomBytes: (size) => new Uint8Array(size),\n * digest: (_algorithm, data) => Effect.succeed(data)\n * })\n * )\n *\n * const program = Effect.gen(function*() {\n * const crypto = yield* Crypto.Crypto\n * return yield* crypto.randomBytes(32)\n * })\n *\n * Effect.runPromise(Effect.provide(program, TestCrypto))\n * ```\n *\n * @since 4.0.0\n */\nimport * as Context from \"./Context.js\";\nimport * as Effect from \"./Effect.js\";\nimport * as PlatformError from \"./PlatformError.js\";\nconst TypeId = \"~effect/platform/Crypto\";\n/**\n * Service tag for platform cryptography.\n *\n * **When to use**\n *\n * Use when you need to provide or retrieve the full platform Crypto service\n * from an effect's context.\n *\n * **Details**\n *\n * Providing this service supplies the cryptographic operations described by the\n * `Crypto` interface.\n *\n * @see {@link make} for constructing a Crypto service from primitive operations\n *\n * @category services\n * @since 4.0.0\n */\nexport const Crypto = /*#__PURE__*/Context.Service(\"effect/Crypto\");\n/**\n * Creates a `Crypto` service from the primitive implementation, deriving the\n * random generator helpers and UUID generation from those primitives.\n *\n * **When to use**\n *\n * Use to build a Crypto service for a platform integration, test layer, or\n * custom runtime from primitive random-byte and digest operations.\n *\n * **Details**\n *\n * The constructor derives random numbers, booleans, integer ranges, shuffling,\n * and UUID generation from `impl.randomBytes`. Digest operations delegate to\n * `impl.digest`.\n *\n * **Gotchas**\n *\n * `impl.randomBytes` must return cryptographically secure bytes of the\n * requested length. UUID formatting mutates the byte array returned for UUID\n * generation, so the implementation should return a fresh array for each call.\n *\n * **Example** (Creating a Crypto service)\n *\n * ```ts\n * import { Crypto, Effect, Layer } from \"effect\"\n *\n * const TestCrypto = Layer.succeed(\n * Crypto.Crypto,\n * Crypto.make({\n * randomBytes: (size) => new Uint8Array(size),\n * digest: (_algorithm, data) => Effect.succeed(data)\n * })\n * )\n * ```\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = impl => {\n const randomBytesUnsafe = impl.randomBytes;\n const randomBytes = size => Effect.map(validateSize(\"randomBytes\", size), randomBytesUnsafe);\n const nextDoubleUnsafe = () => {\n const bytes = randomBytesUnsafe(7);\n const value = (bytes[0] & 0x1f) * 2 ** 48 + bytes[1] * 2 ** 40 + bytes[2] * 2 ** 32 + bytes[3] * 2 ** 24 + bytes[4] * 2 ** 16 + bytes[5] * 2 ** 8 + bytes[6];\n return value / 2 ** 53;\n };\n const nextIntUnsafe = () => Math.floor(nextDoubleUnsafe() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;\n return Crypto.of({\n [TypeId]: TypeId,\n randomBytes,\n nextDoubleUnsafe,\n nextIntUnsafe,\n digest: impl.digest,\n random: Effect.sync(() => nextDoubleUnsafe()),\n randomBoolean: Effect.sync(() => nextDoubleUnsafe() > 0.5),\n randomInt: Effect.sync(() => nextIntUnsafe()),\n randomBetween: (min, max) => Effect.sync(() => nextDoubleUnsafe() * (max - min) + min),\n randomIntBetween(min, max, options) {\n const extra = options?.halfOpen === true ? 0 : 1;\n return Effect.sync(() => {\n const minInt = Math.ceil(min);\n const maxInt = Math.floor(max);\n return Math.floor(nextDoubleUnsafe() * (maxInt - minInt + extra)) + minInt;\n });\n },\n randomShuffle: elements => Effect.sync(() => {\n const buffer = Array.from(elements);\n for (let i = buffer.length - 1; i >= 1; i = i - 1) {\n const index = Math.min(i, Math.floor(nextDoubleUnsafe() * (i + 1)));\n const value = buffer[i];\n buffer[i] = buffer[index];\n buffer[index] = value;\n }\n return buffer;\n }),\n randomUUIDv4: Effect.sync(() => formatUUIDv4(randomBytesUnsafe(16))),\n randomUUIDv7: Effect.clockWith(clock => Effect.succeed(formatUUIDv7(clock.currentTimeMillisUnsafe(), randomBytesUnsafe(16))))\n });\n};\nconst validateSize = (method, size) => Number.isSafeInteger(size) && size >= 0 ? Effect.succeed(size) : Effect.fail(PlatformError.badArgument({\n module: \"Crypto\",\n method,\n description: \"size must be a non-negative safe integer\"\n}));\nconst hex = byte => byte.toString(16).padStart(2, \"0\");\nconst formatUUID = bytes => {\n const segments = [bytes.subarray(0, 4), bytes.subarray(4, 6), bytes.subarray(6, 8), bytes.subarray(8, 10), bytes.subarray(10, 16)];\n return segments.map(segment => Array.from(segment, hex).join(\"\")).join(\"-\");\n};\nconst formatUUIDv4 = bytes => {\n bytes[6] = bytes[6] & 0x0f | 0x40;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n return formatUUID(bytes);\n};\nconst maxUUIDv7Timestamp = 2 ** 48 - 1;\nconst formatUUIDv7 = (timestampMillis, bytes) => {\n const timestamp = Math.min(Math.max(0, Math.trunc(timestampMillis)), maxUUIDv7Timestamp);\n bytes[0] = Math.floor(timestamp / 2 ** 40);\n bytes[1] = Math.floor(timestamp / 2 ** 32) & 0xff;\n bytes[2] = Math.floor(timestamp / 2 ** 24) & 0xff;\n bytes[3] = Math.floor(timestamp / 2 ** 16) & 0xff;\n bytes[4] = Math.floor(timestamp / 2 ** 8) & 0xff;\n bytes[5] = timestamp & 0xff;\n bytes[6] = bytes[6] & 0x0f | 0x70;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n return formatUUID(bytes);\n};\n//# sourceMappingURL=Crypto.js.map",
|
|
12
|
+
"/**\n * The `NodeCrypto` module implements Effect's `Crypto` service with\n * Node-compatible `node:crypto` APIs. It exports {@link make} as the concrete\n * service value and {@link layer} for providing that service to programs that\n * need cryptographic random bytes, UUID generation, random values, or SHA\n * digests over `Uint8Array` input.\n *\n * **Common tasks**\n *\n * - Provide {@link layer} in Node-compatible platform packages and tests\n * - Reuse {@link make} when a surrounding layer already manages service\n * construction\n * - Compute SHA-1, SHA-256, SHA-384, or SHA-512 digests through\n * `effect/Crypto` after the layer is provided\n *\n * **Gotchas**\n *\n * - Random bytes come from `node:crypto.randomBytes`\n * - Digests use `node:crypto.createHash`; hash failures become platform\n * errors\n * - SHA-1 is included for interoperability with existing protocols, not for\n * new security-sensitive designs\n *\n * @since 1.0.0\n */\nimport * as EffectCrypto from \"effect/Crypto\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as PlatformError from \"effect/PlatformError\";\nimport * as NodeCrypto from \"node:crypto\";\nconst toHashAlgorithm = algorithm => {\n switch (algorithm) {\n case \"SHA-1\":\n return \"sha1\";\n case \"SHA-256\":\n return \"sha256\";\n case \"SHA-384\":\n return \"sha384\";\n case \"SHA-512\":\n return \"sha512\";\n }\n};\nconst digest = (algorithm, data) => Effect.try({\n try: () => Uint8Array.from(NodeCrypto.createHash(toHashAlgorithm(algorithm)).update(data).digest()),\n catch: cause => PlatformError.systemError({\n module: \"Crypto\",\n method: \"digest\",\n _tag: \"Unknown\",\n description: \"Could not compute digest\",\n cause\n })\n});\n/**\n * The default Node.js Crypto service implementation.\n *\n * @category constructors\n * @since 1.0.0\n */\nexport const make = /*#__PURE__*/EffectCrypto.make({\n randomBytes: NodeCrypto.randomBytes,\n digest\n});\n/**\n * Layer that provides the Node.js Crypto service implementation.\n *\n * @category layers\n * @since 1.0.0\n */\nexport const layer = /*#__PURE__*/Layer.succeed(EffectCrypto.Crypto, make);\n//# sourceMappingURL=NodeCrypto.js.map",
|
|
13
|
+
"/**\n * The `NodeCrypto` module provides the Node.js `Crypto` service layer for\n * Effect programs. Provide {@link layer} at the edge of a Node application,\n * CLI, script, or test to satisfy `effect/Crypto` with Node's `node:crypto`\n * implementation for secure random bytes, UUID generation, random values, and\n * SHA digest operations.\n *\n * This module is the public Node adapter around the shared Node-compatible\n * implementation. Digest failures are reported as platform errors, and SHA-1\n * remains available only for interoperability with existing protocols.\n *\n * @since 1.0.0\n */\nimport * as NodeCrypto from \"@effect/platform-node-shared/NodeCrypto\";\n/**\n * Layer that provides the Node.js Crypto service implementation.\n *\n * @category layers\n * @since 1.0.0\n */\nexport const layer = NodeCrypto.layer;\n//# sourceMappingURL=NodeCrypto.js.map",
|
|
14
|
+
"/**\n * Shared Node-compatible implementation of Effect's `FileSystem` service.\n *\n * This module adapts Node's `node:fs`, `node:os`, and `node:path` APIs into a\n * `FileSystem` layer for Effect programs running on Node-compatible runtimes.\n * Platform packages use it to provide file and directory I/O, permissions,\n * links, metadata, temporary files and directories, and file watching through\n * the shared `FileSystem` service.\n *\n * **Mental model**\n *\n * {@link layer} installs a process-backed `FileSystem` service. Each operation\n * delegates to the corresponding Node filesystem API, then maps Node failures\n * into `PlatformError` values and invalid arguments into `BadArgument` failures.\n * Paths keep Node's normal behavior: relative paths resolve from the current\n * working directory and platform path rules still apply.\n *\n * **Common tasks**\n *\n * Provide {@link layer} at the Node runtime boundary, then depend on the\n * `FileSystem` service from application code. Use the service for ordinary\n * reads and writes, directory management, metadata inspection, links, temporary\n * resources, and file watching without importing Node's `fs` APIs directly.\n *\n * **Gotchas**\n *\n * Open files are scoped resources with tracked read and write positions; append\n * mode lets the operating system choose the write offset. File watching follows\n * `node:fs.watch` semantics unless a custom watch backend is supplied, so\n * recursive support, event coalescing, and reported paths vary by runtime and\n * platform.\n *\n * @since 4.0.0\n */\nimport * as Cause from \"effect/Cause\";\nimport * as Effect from \"effect/Effect\";\nimport { effectify } from \"effect/Effect\";\nimport * as FileSystem from \"effect/FileSystem\";\nimport { pipe } from \"effect/Function\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport * as Error from \"effect/PlatformError\";\nimport * as Queue from \"effect/Queue\";\nimport * as Stream from \"effect/Stream\";\nimport * as Crypto from \"node:crypto\";\nimport * as NFS from \"node:fs\";\nimport * as OS from \"node:os\";\nimport * as Path from \"node:path\";\nimport { handleErrnoException } from \"./internal/utils.js\";\nconst handleBadArgument = method => err => Error.badArgument({\n module: \"FileSystem\",\n method,\n description: err.message ?? String(err)\n});\n// == access\nconst access = /*#__PURE__*/(() => {\n const nodeAccess = /*#__PURE__*/effectify(NFS.access, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"access\"), /*#__PURE__*/handleBadArgument(\"access\"));\n return (path, options) => {\n let mode = NFS.constants.F_OK;\n if (options?.readable) {\n mode |= NFS.constants.R_OK;\n }\n if (options?.writable) {\n mode |= NFS.constants.W_OK;\n }\n return nodeAccess(path, mode);\n };\n})();\n// == copy\nconst copy = /*#__PURE__*/(() => {\n const nodeCp = /*#__PURE__*/effectify(NFS.cp, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"copy\"), /*#__PURE__*/handleBadArgument(\"copy\"));\n return (fromPath, toPath, options) => nodeCp(fromPath, toPath, {\n force: options?.overwrite ?? false,\n preserveTimestamps: options?.preserveTimestamps ?? false,\n recursive: true\n });\n})();\n// == copyFile\nconst copyFile = /*#__PURE__*/(() => {\n const nodeCopyFile = /*#__PURE__*/effectify(NFS.copyFile, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"copyFile\"), /*#__PURE__*/handleBadArgument(\"copyFile\"));\n return (fromPath, toPath) => nodeCopyFile(fromPath, toPath);\n})();\n// == chmod\nconst chmod = /*#__PURE__*/(() => {\n const nodeChmod = /*#__PURE__*/effectify(NFS.chmod, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"chmod\"), /*#__PURE__*/handleBadArgument(\"chmod\"));\n return (path, mode) => nodeChmod(path, mode);\n})();\n// == chown\nconst chown = /*#__PURE__*/(() => {\n const nodeChown = /*#__PURE__*/effectify(NFS.chown, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"chown\"), /*#__PURE__*/handleBadArgument(\"chown\"));\n return (path, uid, gid) => nodeChown(path, uid, gid);\n})();\n// == link\nconst link = /*#__PURE__*/(() => {\n const nodeLink = /*#__PURE__*/effectify(NFS.link, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"link\"), /*#__PURE__*/handleBadArgument(\"link\"));\n return (existingPath, newPath) => nodeLink(existingPath, newPath);\n})();\n// == makeDirectory\nconst makeDirectory = /*#__PURE__*/(() => {\n const nodeMkdir = /*#__PURE__*/effectify(NFS.mkdir, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"makeDirectory\"), /*#__PURE__*/handleBadArgument(\"makeDirectory\"));\n return (path, options) => nodeMkdir(path, {\n recursive: options?.recursive ?? false,\n mode: options?.mode\n });\n})();\n// == makeTempDirectory\nconst makeTempDirectoryFactory = method => {\n const nodeMkdtemp = effectify(NFS.mkdtemp, handleErrnoException(\"FileSystem\", method), handleBadArgument(method));\n return options => Effect.suspend(() => {\n const prefix = options?.prefix ?? \"\";\n const directory = typeof options?.directory === \"string\" ? Path.join(options.directory, \".\") : OS.tmpdir();\n return nodeMkdtemp(prefix ? Path.join(directory, prefix) : directory + \"/\");\n });\n};\nconst makeTempDirectory = /*#__PURE__*/makeTempDirectoryFactory(\"makeTempDirectory\");\n// == remove\nconst removeFactory = method => {\n const nodeRm = effectify(NFS.rm, handleErrnoException(\"FileSystem\", method), handleBadArgument(method));\n return (path, options) => nodeRm(path, {\n recursive: options?.recursive ?? false,\n force: options?.force ?? false\n });\n};\nconst remove = /*#__PURE__*/removeFactory(\"remove\");\n// == makeTempDirectoryScoped\nconst makeTempDirectoryScoped = /*#__PURE__*/(() => {\n const makeDirectory = /*#__PURE__*/makeTempDirectoryFactory(\"makeTempDirectoryScoped\");\n const removeDirectory = /*#__PURE__*/removeFactory(\"makeTempDirectoryScoped\");\n return options => Effect.acquireRelease(makeDirectory(options), directory => Effect.orDie(removeDirectory(directory, {\n recursive: true\n })));\n})();\n// == open\nconst openFactory = method => {\n const nodeOpen = effectify(NFS.open, handleErrnoException(\"FileSystem\", method), handleBadArgument(method));\n const nodeClose = effectify(NFS.close, handleErrnoException(\"FileSystem\", method), handleBadArgument(method));\n return (path, options) => pipe(Effect.acquireRelease(nodeOpen(path, options?.flag ?? \"r\", options?.mode), fd => Effect.orDie(nodeClose(fd))), Effect.map(fd => makeFile(FileSystem.FileDescriptor(fd), options?.flag?.startsWith(\"a\") ?? false)));\n};\nconst open = /*#__PURE__*/openFactory(\"open\");\nconst makeFile = /*#__PURE__*/(() => {\n const nodeReadFactory = method => effectify(NFS.read, handleErrnoException(\"FileSystem\", method), handleBadArgument(method));\n const nodeRead = /*#__PURE__*/nodeReadFactory(\"read\");\n const nodeReadAlloc = /*#__PURE__*/nodeReadFactory(\"readAlloc\");\n const nodeStat = /*#__PURE__*/effectify(NFS.fstat, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"stat\"), /*#__PURE__*/handleBadArgument(\"stat\"));\n const nodeTruncate = /*#__PURE__*/effectify(NFS.ftruncate, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"truncate\"), /*#__PURE__*/handleBadArgument(\"truncate\"));\n const nodeSync = /*#__PURE__*/effectify(NFS.fsync, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"sync\"), /*#__PURE__*/handleBadArgument(\"sync\"));\n const nodeWriteFactory = method => effectify(NFS.write, handleErrnoException(\"FileSystem\", method), handleBadArgument(method));\n const nodeWrite = /*#__PURE__*/nodeWriteFactory(\"write\");\n const nodeWriteAll = /*#__PURE__*/nodeWriteFactory(\"writeAll\");\n class FileImpl {\n [FileSystem.FileTypeId];\n fd;\n append;\n position = /*#__PURE__*/BigInt(0);\n constructor(fd, append) {\n this[FileSystem.FileTypeId] = FileSystem.FileTypeId;\n this.fd = fd;\n this.append = append;\n }\n get stat() {\n return Effect.map(nodeStat(this.fd), makeFileInfo);\n }\n get sync() {\n return nodeSync(this.fd);\n }\n seek(offset, from) {\n const offsetSize = FileSystem.Size(offset);\n return Effect.sync(() => {\n if (from === \"start\") {\n this.position = offsetSize;\n } else if (from === \"current\") {\n this.position = this.position + offsetSize;\n }\n return this.position;\n });\n }\n read(buffer) {\n return Effect.suspend(() => {\n const position = this.position;\n return Effect.map(nodeRead(this.fd, {\n buffer,\n position\n }), bytesRead => {\n const sizeRead = FileSystem.Size(bytesRead);\n this.position = position + sizeRead;\n return sizeRead;\n });\n });\n }\n readAlloc(size) {\n const sizeNumber = Number(size);\n return Effect.suspend(() => {\n const buffer = Buffer.allocUnsafeSlow(sizeNumber);\n const position = this.position;\n return Effect.map(nodeReadAlloc(this.fd, {\n buffer,\n position\n }), bytesRead => {\n if (bytesRead === 0) {\n return Option.none();\n }\n this.position = position + BigInt(bytesRead);\n if (bytesRead === sizeNumber) {\n return Option.some(buffer);\n }\n const dst = Buffer.allocUnsafeSlow(bytesRead);\n buffer.copy(dst, 0, 0, bytesRead);\n return Option.some(dst);\n });\n });\n }\n truncate(length) {\n return Effect.map(nodeTruncate(this.fd, length ? Number(length) : undefined), () => {\n if (!this.append) {\n const len = BigInt(length ?? 0);\n if (this.position > len) {\n this.position = len;\n }\n }\n });\n }\n write(buffer) {\n return Effect.suspend(() => {\n const position = this.position;\n return Effect.map(nodeWrite(this.fd, buffer, undefined, undefined, this.append ? undefined : Number(position)), bytesWritten => {\n const sizeWritten = FileSystem.Size(bytesWritten);\n if (!this.append) {\n this.position = position + sizeWritten;\n }\n return sizeWritten;\n });\n });\n }\n writeAllChunk(buffer) {\n return Effect.suspend(() => {\n const position = this.position;\n return Effect.flatMap(nodeWriteAll(this.fd, buffer, undefined, undefined, this.append ? undefined : Number(position)), bytesWritten => {\n if (bytesWritten === 0) {\n return Effect.fail(Error.systemError({\n module: \"FileSystem\",\n method: \"writeAll\",\n _tag: \"WriteZero\",\n pathOrDescriptor: this.fd,\n description: \"write returned 0 bytes written\"\n }));\n }\n if (!this.append) {\n this.position = position + BigInt(bytesWritten);\n }\n return bytesWritten < buffer.length ? this.writeAllChunk(buffer.subarray(bytesWritten)) : Effect.void;\n });\n });\n }\n writeAll(buffer) {\n return this.writeAllChunk(buffer);\n }\n }\n return (fd, append) => new FileImpl(fd, append);\n})();\n// == makeTempFile\nconst makeTempFileFactory = method => {\n const makeDirectory = makeTempDirectoryFactory(method);\n return Effect.fnUntraced(function* (options) {\n const directory = yield* makeDirectory(options);\n const random = Crypto.randomBytes(6).toString(\"hex\");\n const name = Path.join(directory, options?.suffix ? `${random}${options.suffix}` : random);\n yield* writeFile(name, new Uint8Array(0));\n return name;\n });\n};\nconst makeTempFile = /*#__PURE__*/makeTempFileFactory(\"makeTempFile\");\n// == makeTempFileScoped\nconst makeTempFileScoped = /*#__PURE__*/(() => {\n const makeFile = /*#__PURE__*/makeTempFileFactory(\"makeTempFileScoped\");\n const removeDirectory = /*#__PURE__*/removeFactory(\"makeTempFileScoped\");\n return options => Effect.acquireRelease(makeFile(options), file => Effect.orDie(removeDirectory(Path.dirname(file), {\n recursive: true\n })));\n})();\n// == readDirectory\nconst readDirectory = (path, options) => Effect.tryPromise({\n try: () => NFS.promises.readdir(path, options),\n catch: err => handleErrnoException(\"FileSystem\", \"readDirectory\")(err, [path])\n});\n// == readFile\nconst readFile = path => Effect.callback((resume, signal) => {\n try {\n NFS.readFile(path, {\n signal\n }, (err, data) => {\n if (err) {\n resume(Effect.fail(handleErrnoException(\"FileSystem\", \"readFile\")(err, [path])));\n } else {\n resume(Effect.succeed(data));\n }\n });\n } catch (err) {\n resume(Effect.fail(handleBadArgument(\"readFile\")(err)));\n }\n});\n// == readLink\nconst readLink = /*#__PURE__*/(() => {\n const nodeReadLink = /*#__PURE__*/effectify(NFS.readlink, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"readLink\"), /*#__PURE__*/handleBadArgument(\"readLink\"));\n return path => nodeReadLink(path);\n})();\n// == realPath\nconst realPath = /*#__PURE__*/(() => {\n const nodeRealPath = /*#__PURE__*/effectify(NFS.realpath, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"realPath\"), /*#__PURE__*/handleBadArgument(\"realPath\"));\n return path => nodeRealPath(path);\n})();\n// == rename\nconst rename = /*#__PURE__*/(() => {\n const nodeRename = /*#__PURE__*/effectify(NFS.rename, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"rename\"), /*#__PURE__*/handleBadArgument(\"rename\"));\n return (oldPath, newPath) => nodeRename(oldPath, newPath);\n})();\n// == stat\nconst makeFileInfo = stat => ({\n type: stat.isFile() ? \"File\" : stat.isDirectory() ? \"Directory\" : stat.isSymbolicLink() ? \"SymbolicLink\" : stat.isBlockDevice() ? \"BlockDevice\" : stat.isCharacterDevice() ? \"CharacterDevice\" : stat.isFIFO() ? \"FIFO\" : stat.isSocket() ? \"Socket\" : \"Unknown\",\n mtime: Option.fromNullishOr(stat.mtime),\n atime: Option.fromNullishOr(stat.atime),\n birthtime: Option.fromNullishOr(stat.birthtime),\n dev: stat.dev,\n rdev: Option.fromNullishOr(stat.rdev),\n ino: Option.fromNullishOr(stat.ino),\n mode: stat.mode,\n nlink: Option.fromNullishOr(stat.nlink),\n uid: Option.fromNullishOr(stat.uid),\n gid: Option.fromNullishOr(stat.gid),\n size: FileSystem.Size(stat.size),\n blksize: stat.blksize !== undefined ? Option.some(FileSystem.Size(stat.blksize)) : Option.none(),\n blocks: Option.fromNullishOr(stat.blocks)\n});\nconst stat = /*#__PURE__*/(() => {\n const nodeStat = /*#__PURE__*/effectify(NFS.stat, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"stat\"), /*#__PURE__*/handleBadArgument(\"stat\"));\n return path => Effect.map(nodeStat(path), makeFileInfo);\n})();\n// == symlink\nconst symlink = /*#__PURE__*/(() => {\n const nodeSymlink = /*#__PURE__*/effectify(NFS.symlink, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"symlink\"), /*#__PURE__*/handleBadArgument(\"symlink\"));\n return (target, path) => nodeSymlink(target, path);\n})();\n// == truncate\nconst truncate = /*#__PURE__*/(() => {\n const nodeTruncate = /*#__PURE__*/effectify(NFS.truncate, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"truncate\"), /*#__PURE__*/handleBadArgument(\"truncate\"));\n return (path, length) => nodeTruncate(path, length !== undefined ? Number(length) : undefined);\n})();\n// == utimes\nconst utimes = /*#__PURE__*/(() => {\n const nodeUtimes = /*#__PURE__*/effectify(NFS.utimes, /*#__PURE__*/handleErrnoException(\"FileSystem\", \"utime\"), /*#__PURE__*/handleBadArgument(\"utime\"));\n return (path, atime, mtime) => nodeUtimes(path, atime, mtime);\n})();\n// == watch\nconst watchNode = path => Stream.callback(queue => Effect.acquireRelease(Effect.sync(() => {\n const watcher = NFS.watch(path, {\n recursive: true\n }, (event, path) => {\n if (!path) return;\n switch (event) {\n case \"rename\":\n {\n Effect.runFork(Effect.matchEffect(stat(path), {\n onSuccess: _ => Queue.offer(queue, {\n _tag: \"Create\",\n path\n }),\n onFailure: _ => Queue.offer(queue, {\n _tag: \"Remove\",\n path\n })\n }));\n return;\n }\n case \"change\":\n {\n Queue.offerUnsafe(queue, {\n _tag: \"Update\",\n path\n });\n return;\n }\n }\n });\n watcher.on(\"error\", error => {\n Queue.failCauseUnsafe(queue, Cause.fail(Error.systemError({\n module: \"FileSystem\",\n _tag: \"Unknown\",\n method: \"watch\",\n pathOrDescriptor: path,\n cause: error\n })));\n });\n watcher.on(\"close\", () => {\n Queue.endUnsafe(queue);\n });\n return watcher;\n}), watcher => Effect.sync(() => watcher.close())));\nconst watch = (backend, path) => stat(path).pipe(Effect.map(stat => backend.pipe(Option.flatMap(_ => _.register(path, stat)), Option.getOrElse(() => watchNode(path)))), Stream.unwrap);\n// == writeFile\nconst writeFile = (path, data, options) => Effect.callback((resume, signal) => {\n try {\n NFS.writeFile(path, data, {\n signal,\n flag: options?.flag,\n mode: options?.mode\n }, err => {\n if (err) {\n resume(Effect.fail(handleErrnoException(\"FileSystem\", \"writeFile\")(err, [path])));\n } else {\n resume(Effect.void);\n }\n });\n } catch (err) {\n resume(Effect.fail(handleBadArgument(\"writeFile\")(err)));\n }\n});\nconst makeFileSystem = /*#__PURE__*/Effect.map(/*#__PURE__*/Effect.serviceOption(FileSystem.WatchBackend), backend => FileSystem.make({\n access,\n chmod,\n chown,\n copy,\n copyFile,\n link,\n makeDirectory,\n makeTempDirectory,\n makeTempDirectoryScoped,\n makeTempFile,\n makeTempFileScoped,\n open,\n readDirectory,\n readFile,\n readLink,\n realPath,\n remove,\n rename,\n stat,\n symlink,\n truncate,\n utimes,\n watch(path) {\n return watch(backend, path);\n },\n writeFile\n}));\n/**\n * Provides the `FileSystem` service backed by Node filesystem APIs, including\n * file operations, directory operations, links, metadata, and file watching.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/Layer.effect(FileSystem.FileSystem)(makeFileSystem);\n//# sourceMappingURL=NodeFileSystem.js.map",
|
|
15
|
+
"/**\n * Node.js `FileSystem` layer for programs that perform real filesystem I/O.\n *\n * The exported layer satisfies the platform-independent `FileSystem` service\n * with Node-backed operations for files, directories, metadata, permissions,\n * links, temporary paths, and path watching. Effects still call the service from\n * `effect/FileSystem`; this module only chooses the Node implementation.\n *\n * **Mental model**\n *\n * Provide `NodeFileSystem.layer` at the process boundary when filesystem\n * effects should touch the host filesystem. Use `NodeServices.layer` instead\n * when the same program also needs the standard Node path, stdio, terminal,\n * crypto, and child process services. Tests that need isolation can provide a\n * different `FileSystem` layer without changing the code that performs the\n * reads and writes.\n *\n * **Gotchas**\n *\n * Paths are interpreted by Node, so relative paths resolve against the current\n * working directory and platform-specific path rules apply. Filesystem failures\n * are reported through Effect platform errors rather than thrown exceptions.\n * File watching uses `FileSystem.WatchBackend` when one is available; otherwise\n * it follows `node:fs.watch`, whose recursive support, event batching, and\n * reported path names vary across operating systems.\n *\n * @since 4.0.0\n */\nimport * as NodeFileSystem from \"@effect/platform-node-shared/NodeFileSystem\";\n/**\n * Provides the `FileSystem` service backed by Node filesystem APIs.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodeFileSystem.layer;\n//# sourceMappingURL=NodeFileSystem.js.map",
|
|
16
|
+
"/**\n * Node-backed provider for Effect's `Path` service.\n *\n * This module turns Node's `node:path` and `node:url` APIs into `Layer`s for\n * programs that depend on `Path`. Use it when code should receive path\n * operations from the Effect environment instead of importing `node:path`\n * directly, including configuration loading, filesystem composition, and file\n * URL conversion.\n *\n * **Mental model**\n *\n * `layer` follows the platform semantics of the current Node runtime. The\n * `layerPosix` and `layerWin32` variants pin the syntax rules to POSIX or\n * Windows, which is useful for deterministic parsing, formatting, and tests.\n * All three layers include `fromFileUrl` and `toFileUrl` behavior backed by\n * Node's URL conversion functions.\n *\n * **Gotchas**\n *\n * Path operations are syntactic: they normalize separators, roots, drive\n * letters, UNC segments, extensions, and relative segments without checking the\n * filesystem. File URL conversion follows Node's validation and encoding\n * rules, and invalid conversions fail with `BadArgument`.\n *\n * @since 4.0.0\n */\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport { Path, TypeId } from \"effect/Path\";\nimport { BadArgument } from \"effect/PlatformError\";\nimport * as NodePath from \"node:path\";\nimport * as NodeUrl from \"node:url\";\nconst fromFileUrl = url => Effect.try({\n try: () => NodeUrl.fileURLToPath(url),\n catch: cause => new BadArgument({\n module: \"Path\",\n method: \"fromFileUrl\",\n cause\n })\n});\nconst toFileUrl = path => Effect.try({\n try: () => NodeUrl.pathToFileURL(path),\n catch: cause => new BadArgument({\n module: \"Path\",\n method: \"toFileUrl\",\n cause\n })\n});\n/**\n * Provides the `Path` service using Node's POSIX path implementation plus\n * file URL conversion helpers.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerPosix = /*#__PURE__*/Layer.succeed(Path)({\n [TypeId]: TypeId,\n ...NodePath.posix,\n fromFileUrl,\n toFileUrl\n});\n/**\n * Provides the `Path` service using Node's Windows path implementation plus\n * file URL conversion helpers.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerWin32 = /*#__PURE__*/Layer.succeed(Path)({\n [TypeId]: TypeId,\n ...NodePath.win32,\n fromFileUrl,\n toFileUrl\n});\n/**\n * Provides the default `Path` service using the host platform's Node path\n * implementation plus file URL conversion helpers.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/Layer.succeed(Path)({\n [TypeId]: TypeId,\n ...NodePath,\n fromFileUrl,\n toFileUrl\n});\n//# sourceMappingURL=NodePath.js.map",
|
|
17
|
+
"/**\n * Node.js layers for Effect's `Path` service.\n *\n * This module adapts Node's path and file URL behavior to the\n * platform-independent `Path` service. Provide one of its layers when a Node\n * program needs to build, normalize, parse, resolve, or convert paths without\n * depending directly on `node:path`.\n *\n * **Mental model**\n *\n * `Path` is a syntactic service: it manipulates strings and `file:` URLs. It\n * does not read the filesystem, check permissions, or validate that paths\n * exist. The selected layer decides which separator, drive-letter, UNC, and URL\n * conversion rules are used.\n *\n * **Common tasks**\n *\n * Use `layer` for host-platform Node semantics, `layerPosix` for stable POSIX\n * behavior, and `layerWin32` for stable Windows behavior. `NodeServices.layer`\n * already includes `layer`, so import this module directly when a program wants\n * only path support or a platform-specific variant.\n *\n * **Gotchas**\n *\n * Results that are correct on one platform may not be portable to another.\n * `fromFileUrl` and `toFileUrl` use Node's `node:url` conversion rules and\n * report invalid conversions as `BadArgument` failures.\n *\n * @since 4.0.0\n */\nimport * as NodePath from \"@effect/platform-node-shared/NodePath\";\n/**\n * Provides the default Node `Path` service using the platform's `node:path`\n * implementation.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodePath.layer;\n/**\n * Provides the `Path` service using Node's POSIX path implementation,\n * regardless of the host platform.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerPosix = NodePath.layerPosix;\n/**\n * Provides the `Path` service using Node's Windows path implementation,\n * regardless of the host platform.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerWin32 = NodePath.layerWin32;\n//# sourceMappingURL=NodePath.js.map",
|
|
18
|
+
"/**\n * Shared Node.js implementation of the Effect `Stdio` service.\n *\n * `NodeStdio` provides {@link Stdio.Stdio} from the current Node process. The\n * exported {@link layer} reads command-line arguments from `process.argv`,\n * consumes input from `process.stdin`, and writes normal and error output to\n * `process.stdout` and `process.stderr`. It is the shared implementation used\n * by Node platform packages for CLIs, scripts, command runners, test harnesses,\n * and other process-oriented programs.\n *\n * **Mental model**\n *\n * Application code should depend on `Stdio`; this module decides that the\n * backing resources are the global Node process handles. The layer does not\n * create new streams and does not claim exclusive ownership of the existing\n * ones.\n *\n * **Common tasks**\n *\n * Use {@link layer} when an Effect program needs process arguments, stdin,\n * stdout, or stderr through the service environment. Pair it with terminal\n * services when the same program also needs line editing, raw key input, or\n * terminal dimensions.\n *\n * **Gotchas**\n *\n * Process stdio streams are shared with the rest of the Node process. This\n * layer leaves stdin open and does not end stdout or stderr by default, avoiding\n * accidental closure of handles that other code may still use. The streams may\n * be pipes, files, or TTYs; terminal-specific behavior such as raw mode, echo,\n * color detection, and cursor movement belongs with terminal APIs.\n *\n * @since 4.0.0\n */\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport { systemError } from \"effect/PlatformError\";\nimport * as Stdio from \"effect/Stdio\";\nimport { fromWritable } from \"./NodeSink.js\";\nimport { fromReadable } from \"./NodeStream.js\";\n/**\n * Provides `Stdio` from `process.argv`, `process.stdin`, `process.stdout`,\n * and `process.stderr`; stdin remains open and stdout/stderr are not ended by\n * default.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/Layer.succeed(Stdio.Stdio, /*#__PURE__*/Stdio.make({\n args: /*#__PURE__*/Effect.sync(() => process.argv.slice(2)),\n stdout: options => fromWritable({\n evaluate: () => process.stdout,\n onError: cause => systemError({\n module: \"Stdio\",\n method: \"stdout\",\n _tag: \"Unknown\",\n cause\n }),\n endOnDone: options?.endOnDone ?? false\n }),\n stderr: options => fromWritable({\n evaluate: () => process.stderr,\n onError: cause => systemError({\n module: \"Stdio\",\n method: \"stderr\",\n _tag: \"Unknown\",\n cause\n }),\n endOnDone: options?.endOnDone ?? false\n }),\n stdin: /*#__PURE__*/fromReadable({\n evaluate: () => process.stdin,\n onError: cause => systemError({\n module: \"Stdio\",\n method: \"stdin\",\n _tag: \"Unknown\",\n cause\n }),\n closeOnDone: false\n })\n}));\n//# sourceMappingURL=NodeStdio.js.map",
|
|
19
|
+
"/**\n * Node.js `Stdio` layer for the current process.\n *\n * The exported layer satisfies the platform-independent `Stdio` service by\n * reading command-line arguments from `process.argv`, consuming input from\n * `process.stdin`, and writing output streams to `process.stdout` and\n * `process.stderr`. It is the stdio bridge used by CLIs, scripts, command\n * runners, and tests that intentionally communicate through the host process.\n *\n * **Mental model**\n *\n * Effects should depend on `Stdio`; this module decides that the backing\n * streams are the global Node process handles. Provide `NodeStdio.layer` when a\n * program only needs standard input and output, or `NodeServices.layer` when the\n * same entrypoint also needs the other default Node services.\n *\n * **Gotchas**\n *\n * The process stdio streams are shared resources. The layer leaves stdin open\n * and does not end stdout or stderr by default, avoiding accidental closure of\n * handles that other code in the same process may still use. Stdio might be a\n * pipe, file, or TTY; terminal-specific behavior such as raw mode, echo, color\n * detection, and cursor movement belongs with terminal APIs rather than this\n * service.\n *\n * @since 4.0.0\n */\nimport * as NodeStdio from \"@effect/platform-node-shared/NodeStdio\";\n/**\n * Provides the `Stdio` service backed by the current process arguments,\n * stdin, stdout, and stderr streams.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodeStdio.layer;\n//# sourceMappingURL=NodeStdio.js.map",
|
|
20
|
+
"import * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport { badArgument } from \"effect/PlatformError\";\nimport * as Predicate from \"effect/Predicate\";\nimport * as Queue from \"effect/Queue\";\nimport * as RcRef from \"effect/RcRef\";\nimport * as Terminal from \"effect/Terminal\";\nimport * as readline from \"node:readline\";\n/**\n * Creates a scoped process-backed `Terminal` using Node `readline`, enabling\n * TTY raw mode while in scope and using the supplied predicate to decide when\n * key input should end.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = /*#__PURE__*/Effect.fnUntraced(function* (shouldQuit = defaultShouldQuit) {\n const stdin = process.stdin;\n const stdout = process.stdout;\n // Acquire readline interface with TTY setup/cleanup inside the scope\n const rlRef = yield* RcRef.make({\n acquire: Effect.acquireRelease(Effect.sync(() => {\n const rl = readline.createInterface({\n input: stdin,\n escapeCodeTimeout: 50\n });\n readline.emitKeypressEvents(stdin, rl);\n if (stdin.isTTY) {\n stdin.setRawMode(true);\n }\n return rl;\n }), rl => Effect.sync(() => {\n if (stdin.isTTY) {\n stdin.setRawMode(false);\n }\n rl.close();\n }))\n });\n const columns = Effect.sync(() => stdout.columns ?? 0);\n const rows = Effect.sync(() => stdout.rows ?? 0);\n const readInput = Effect.gen(function* () {\n yield* RcRef.get(rlRef);\n const queue = yield* Queue.make();\n const handleKeypress = (s, k) => {\n const userInput = {\n input: Option.fromUndefinedOr(s),\n key: {\n name: k.name ?? \"\",\n ctrl: !!k.ctrl,\n meta: !!k.meta,\n shift: !!k.shift\n }\n };\n Queue.offerUnsafe(queue, userInput);\n if (shouldQuit(userInput)) {\n Queue.endUnsafe(queue);\n }\n };\n yield* Effect.addFinalizer(() => Effect.sync(() => stdin.off(\"keypress\", handleKeypress)));\n stdin.on(\"keypress\", handleKeypress);\n return queue;\n });\n const readLine = Effect.scoped(Effect.flatMap(RcRef.get(rlRef), readlineInterface => Effect.callback(resume => {\n const onLine = line => resume(Effect.succeed(line));\n readlineInterface.once(\"line\", onLine);\n return Effect.sync(() => readlineInterface.off(\"line\", onLine));\n })));\n const display = prompt => Effect.uninterruptible(Effect.callback(resume => {\n stdout.write(prompt, err => Predicate.isNullish(err) ? resume(Effect.void) : resume(Effect.fail(badArgument({\n module: \"Terminal\",\n method: \"display\",\n description: \"Failed to write prompt to stdout\",\n cause: err\n }))));\n }));\n return Terminal.make({\n columns,\n rows,\n readInput,\n readLine,\n display\n });\n});\n/**\n * Provides the default process-backed `Terminal` service, ending key input on\n * Ctrl+C or Ctrl+D.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/Layer.effect(Terminal.Terminal, /*#__PURE__*/make(defaultShouldQuit));\nfunction defaultShouldQuit(input) {\n return input.key.ctrl && (input.key.name === \"c\" || input.key.name === \"d\");\n}\n//# sourceMappingURL=NodeTerminal.js.map",
|
|
21
|
+
"/**\n * Node.js implementation of the Effect `Terminal` service.\n *\n * `NodeTerminal` connects `Terminal` to the current process' stdin and stdout\n * so Node programs can read lines, stream key presses, write display output,\n * and inspect terminal dimensions through the Effect service environment.\n *\n * **Mental model**\n *\n * `make` acquires a scoped terminal backed by process streams, and `layer`\n * provides that service with the default key sequence for quitting input. When\n * stdin is a TTY, low-level key input temporarily enables raw mode for the\n * lifetime of the scope; finalization restores the previous terminal state.\n *\n * **Gotchas**\n *\n * In non-TTY environments such as CI, pipes, or redirected input, terminal\n * dimensions may be reported as zero and raw-mode key handling is unavailable.\n * For plain stdin/stdout byte streams, use the standard I/O service instead of\n * the interactive terminal service.\n *\n * @since 4.0.0\n */\nimport * as NodeTerminal from \"@effect/platform-node-shared/NodeTerminal\";\n/**\n * Creates a scoped `Terminal` service backed by process stdin/stdout, using the\n * optional predicate to decide when key input should end the input stream.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = NodeTerminal.make;\n/**\n * Provides the default process-backed `Terminal` service, ending key input on\n * the default quit keys.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodeTerminal.layer;\n//# sourceMappingURL=NodeTerminal.js.map",
|
|
22
|
+
"import * as Layer from \"effect/Layer\";\nimport * as NodeChildProcessSpawner from \"./NodeChildProcessSpawner.js\";\nimport * as NodeCrypto from \"./NodeCrypto.js\";\nimport * as NodeFileSystem from \"./NodeFileSystem.js\";\nimport * as NodePath from \"./NodePath.js\";\nimport * as NodeStdio from \"./NodeStdio.js\";\nimport * as NodeTerminal from \"./NodeTerminal.js\";\n/**\n * Provides the default Node implementations for child process spawning,\n * filesystem, path, stdio, and terminal services.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/Layer.provideMerge(NodeChildProcessSpawner.layer, /*#__PURE__*/Layer.mergeAll(NodeFileSystem.layer, NodeCrypto.layer, NodePath.layer, NodeStdio.layer, NodeTerminal.layer));\n//# sourceMappingURL=NodeServices.js.map"
|
|
23
|
+
],
|
|
24
|
+
"mappings": ";22CA+BO,SAAM,QAA8B,GAAQ,EAOtC,GAA+B,GAAQ,EAC9C,GAAe,iDACf,GAAc,EACjB,IAAe,MACD,GACf,MAAM,EAAG,CACP,MAAO,CACL,IAAK,qBACL,IAAK,KAAK,GACZ,EAEJ,EAOa,GAAa,KAAU,OAAO,OAAO,OAAO,OAAO,EAAW,EAAG,CAAM,EAQvE,GAAO,KAAS,CAC3B,IAAM,EAAe,CAAC,EAAS,IAAY,EAAM,CAAO,EAAE,KAAY,EAAI,KAAiB,GAAW,GAAS,gBAAkB,GAAO,EAAO,IAAM,EAAO,MAAM,CAAC,EAAU,EAAM,EAC7K,EAAc,CAAC,EAAS,IAAmB,GAAW,EAAa,EAAS,CAAO,CAAC,EAC1F,OAAO,GAAoB,GAAG,CAC5B,QACA,SAAU,KAAkB,GAAc,EAAQ,EAAM,CAAO,EAAG,KAAU,EAAO,QAAQ,CAAC,EAC5F,eACA,cACA,MAAO,CAAC,EAAS,IAAmB,GAAW,EAAY,EAAS,CAAO,CAAC,EAC5E,OAAQ,CAAC,EAAS,IAAmB,GAAS,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