cdk-ecr-deployment 3.0.77 → 3.0.78
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/.jsii +2 -2
- package/.jsii.tabl.json +1 -1
- package/lib/index.js +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +10 -22
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1 -12
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +4 -32
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +0 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +2 -10
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +10 -22
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1 -12
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +4 -32
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +0 -11
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +2 -10
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +10 -22
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1 -12
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +4 -32
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +0 -11
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +2 -10
- package/package.json +3 -3
package/.jsii
CHANGED
|
@@ -4367,6 +4367,6 @@
|
|
|
4367
4367
|
"symbolId": "src/index:S3ArchiveName"
|
|
4368
4368
|
}
|
|
4369
4369
|
},
|
|
4370
|
-
"version": "3.0.
|
|
4371
|
-
"fingerprint": "
|
|
4370
|
+
"version": "3.0.78",
|
|
4371
|
+
"fingerprint": "5ZL/vXnv/+zTt9p1DDoUXaiU2gMjNtn4GZ/H0PtaImQ="
|
|
4372
4372
|
}
|
package/.jsii.tabl.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2","toolVersion":"5.4.25","snippets":{"33850328020507963bc7787401a169bb06e49f6132425a6d1529815c1554c645":{"translations":{"python":{"source":"from aws_cdk.aws_ecr_assets import DockerImageAsset\n\n\nimage = DockerImageAsset(self, \"CDKDockerImage\",\n directory=path.join(__dirname, \"docker\")\n)\n\n# Copy from cdk docker image asset to another ECR.\necrdeploy.ECRDeployment(self, \"DeployDockerImage1\",\n src=ecrdeploy.DockerImageName(image.image_uri),\n dest=ecrdeploy.DockerImageName(f\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\")\n)\n\n# Copy from docker registry to ECR.\necrdeploy.ECRDeployment(self, \"DeployDockerImage2\",\n src=ecrdeploy.DockerImageName(\"nginx:latest\"),\n dest=ecrdeploy.DockerImageName(f\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\")\n)\n\n# Copy from private docker registry to ECR.\n# The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\necrdeploy.ECRDeployment(self, \"DeployDockerImage3\",\n src=ecrdeploy.DockerImageName(\"javacs3/nginx:latest\", \"username:password\"),\n # src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n # src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n dest=ecrdeploy.DockerImageName(f\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\")\n).add_to_principal_policy(iam.PolicyStatement(\n effect=iam.Effect.ALLOW,\n actions=[\"secretsmanager:GetSecretValue\"\n ],\n resources=[\"*\"]\n))","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Ecr.Assets;\n\n\nvar image = new DockerImageAsset(this, \"CDKDockerImage\", new DockerImageAssetProps {\n Directory = Join(__dirname, \"docker\")\n});\n\n// Copy from cdk docker image asset to another ECR.\n// Copy from cdk docker image asset to another ECR.\nnew ECRDeployment(this, \"DeployDockerImage1\", new ECRDeploymentProps {\n Src = new DockerImageName(image.ImageUri),\n Dest = new DockerImageName($\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\")\n});\n\n// Copy from docker registry to ECR.\n// Copy from docker registry to ECR.\nnew ECRDeployment(this, \"DeployDockerImage2\", new ECRDeploymentProps {\n Src = new DockerImageName(\"nginx:latest\"),\n Dest = new DockerImageName($\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\")\n});\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nnew ECRDeployment(this, \"DeployDockerImage3\", new ECRDeploymentProps {\n Src = new DockerImageName(\"javacs3/nginx:latest\", \"username:password\"),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n Dest = new DockerImageName($\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\")\n}).AddToPrincipalPolicy(new PolicyStatement(new PolicyStatementProps {\n Effect = Effect.ALLOW,\n Actions = new [] { \"secretsmanager:GetSecretValue\" },\n Resources = new [] { \"*\" }\n}));","version":"1"},"java":{"source":"import software.amazon.awscdk.services.ecr.assets.DockerImageAsset;\n\n\nDockerImageAsset image = DockerImageAsset.Builder.create(this, \"CDKDockerImage\")\n .directory(join(__dirname, \"docker\"))\n .build();\n\n// Copy from cdk docker image asset to another ECR.\n// Copy from cdk docker image asset to another ECR.\nECRDeployment.Builder.create(this, \"DeployDockerImage1\")\n .src(new DockerImageName(image.getImageUri()))\n .dest(new DockerImageName(String.format(\"%s.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\", Aws.ACCOUNT_ID)))\n .build();\n\n// Copy from docker registry to ECR.\n// Copy from docker registry to ECR.\nECRDeployment.Builder.create(this, \"DeployDockerImage2\")\n .src(new DockerImageName(\"nginx:latest\"))\n .dest(new DockerImageName(String.format(\"%s.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\", Aws.ACCOUNT_ID)))\n .build();\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nECRDeployment.Builder.create(this, \"DeployDockerImage3\")\n .src(new DockerImageName(\"javacs3/nginx:latest\", \"username:password\"))\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n .dest(new DockerImageName(String.format(\"%s.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\", Aws.ACCOUNT_ID)))\n .build().addToPrincipalPolicy(PolicyStatement.Builder.create()\n .effect(Effect.ALLOW)\n .actions(List.of(\"secretsmanager:GetSecretValue\"))\n .resources(List.of(\"*\"))\n .build());","version":"1"},"go":{"source":"import \"github.com/aws/aws-cdk-go/awscdk\"\n\n\nimage := awscdk.NewDockerImageAsset(this, jsii.String(\"CDKDockerImage\"), &DockerImageAssetProps{\n\tDirectory: path.join(__dirname, jsii.String(\"docker\")),\n})\n\n// Copy from cdk docker image asset to another ECR.\n// Copy from cdk docker image asset to another ECR.\necrdeploy.NewECRDeployment(this, jsii.String(\"DeployDockerImage1\"), &ECRDeploymentProps{\n\tSrc: ecrdeploy.NewDockerImageName(image.ImageUri),\n\tDest: ecrdeploy.NewDockerImageName(fmt.Sprintf(\"%v.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\", cdk.Aws_ACCOUNT_ID())),\n})\n\n// Copy from docker registry to ECR.\n// Copy from docker registry to ECR.\necrdeploy.NewECRDeployment(this, jsii.String(\"DeployDockerImage2\"), &ECRDeploymentProps{\n\tSrc: ecrdeploy.NewDockerImageName(jsii.String(\"nginx:latest\")),\n\tDest: ecrdeploy.NewDockerImageName(fmt.Sprintf(\"%v.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\", cdk.Aws_ACCOUNT_ID())),\n})\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\necrdeploy.NewECRDeployment(this, jsii.String(\"DeployDockerImage3\"), &ECRDeploymentProps{\n\tSrc: ecrdeploy.NewDockerImageName(jsii.String(\"javacs3/nginx:latest\"), jsii.String(\"username:password\")),\n\t// src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n\t// src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n\tDest: ecrdeploy.NewDockerImageName(fmt.Sprintf(\"%v.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\", cdk.Aws_ACCOUNT_ID())),\n}).AddToPrincipalPolicy(awscdk.Aws_iam.NewPolicyStatement(&PolicyStatementProps{\n\tEffect: awscdk.*Aws_iam.Effect_ALLOW,\n\tActions: []*string{\n\t\tjsii.String(\"secretsmanager:GetSecretValue\"),\n\t},\n\tResources: []*string{\n\t\tjsii.String(\"*\"),\n\t},\n}))","version":"1"},"$":{"source":"import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\n\nconst image = new DockerImageAsset(this, 'CDKDockerImage', {\n directory: path.join(__dirname, 'docker'),\n});\n\n// Copy from cdk docker image asset to another ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage1', {\n src: new ecrdeploy.DockerImageName(image.imageUri),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest`),\n});\n\n// Copy from docker registry to ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage2', {\n src: new ecrdeploy.DockerImageName('nginx:latest'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest`),\n});\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage3', {\n src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'username:password'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest`),\n}).addToPrincipalPolicy(new iam.PolicyStatement({\n effect: iam.Effect.ALLOW,\n actions: [\n 'secretsmanager:GetSecretValue',\n ],\n resources: ['*'],\n}));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-ecr-deployment"},"field":{"field":"markdown","line":33}},"didCompile":true,"fqnsReferenced":["aws-cdk-lib.aws_ecr_assets.DockerImageAsset","aws-cdk-lib.aws_ecr_assets.DockerImageAsset#imageUri","aws-cdk-lib.aws_ecr_assets.DockerImageAssetProps","aws-cdk-lib.aws_iam.Effect","aws-cdk-lib.aws_iam.Effect#ALLOW","aws-cdk-lib.aws_iam.PolicyStatement","aws-cdk-lib.aws_iam.PolicyStatementProps","cdk-ecr-deployment.DockerImageName","cdk-ecr-deployment.ECRDeployment","cdk-ecr-deployment.ECRDeployment#addToPrincipalPolicy","cdk-ecr-deployment.ECRDeploymentProps","cdk-ecr-deployment.IImageName","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport * as path from 'node:path';\nimport { Construct } from 'constructs';\n import * as ecrdeploy from 'cdk-ecr-deployment';\nimport {\n Stack,\n aws_iam as iam,\n} from 'aws-cdk-lib';\nimport * as cdk from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst image = new DockerImageAsset(this, 'CDKDockerImage', {\n directory: path.join(__dirname, 'docker'),\n});\n\n// Copy from cdk docker image asset to another ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage1', {\n src: new ecrdeploy.DockerImageName(image.imageUri),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest`),\n});\n\n// Copy from docker registry to ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage2', {\n src: new ecrdeploy.DockerImageName('nginx:latest'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest`),\n});\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage3', {\n src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'username:password'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest`),\n}).addToPrincipalPolicy(new iam.PolicyStatement({\n effect: iam.Effect.ALLOW,\n actions: [\n 'secretsmanager:GetSecretValue',\n ],\n resources: ['*'],\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":11,"16":3,"18":3,"80":51,"110":4,"209":2,"210":5,"211":21,"213":2,"214":11,"228":3,"239":3,"243":1,"244":3,"260":1,"261":1,"272":1,"273":1,"275":1,"276":1,"303":10,"312":1},"fqnsFingerprint":"49c3b893d162beea6924f8cf712357c6390954e35a181bc42817e82aa4070d12"}}}
|
|
1
|
+
{"version":"2","toolVersion":"5.4.28","snippets":{"33850328020507963bc7787401a169bb06e49f6132425a6d1529815c1554c645":{"translations":{"python":{"source":"from aws_cdk.aws_ecr_assets import DockerImageAsset\n\n\nimage = DockerImageAsset(self, \"CDKDockerImage\",\n directory=path.join(__dirname, \"docker\")\n)\n\n# Copy from cdk docker image asset to another ECR.\necrdeploy.ECRDeployment(self, \"DeployDockerImage1\",\n src=ecrdeploy.DockerImageName(image.image_uri),\n dest=ecrdeploy.DockerImageName(f\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\")\n)\n\n# Copy from docker registry to ECR.\necrdeploy.ECRDeployment(self, \"DeployDockerImage2\",\n src=ecrdeploy.DockerImageName(\"nginx:latest\"),\n dest=ecrdeploy.DockerImageName(f\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\")\n)\n\n# Copy from private docker registry to ECR.\n# The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\necrdeploy.ECRDeployment(self, \"DeployDockerImage3\",\n src=ecrdeploy.DockerImageName(\"javacs3/nginx:latest\", \"username:password\"),\n # src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n # src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n dest=ecrdeploy.DockerImageName(f\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\")\n).add_to_principal_policy(iam.PolicyStatement(\n effect=iam.Effect.ALLOW,\n actions=[\"secretsmanager:GetSecretValue\"\n ],\n resources=[\"*\"]\n))","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Ecr.Assets;\n\n\nvar image = new DockerImageAsset(this, \"CDKDockerImage\", new DockerImageAssetProps {\n Directory = Join(__dirname, \"docker\")\n});\n\n// Copy from cdk docker image asset to another ECR.\n// Copy from cdk docker image asset to another ECR.\nnew ECRDeployment(this, \"DeployDockerImage1\", new ECRDeploymentProps {\n Src = new DockerImageName(image.ImageUri),\n Dest = new DockerImageName($\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\")\n});\n\n// Copy from docker registry to ECR.\n// Copy from docker registry to ECR.\nnew ECRDeployment(this, \"DeployDockerImage2\", new ECRDeploymentProps {\n Src = new DockerImageName(\"nginx:latest\"),\n Dest = new DockerImageName($\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\")\n});\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nnew ECRDeployment(this, \"DeployDockerImage3\", new ECRDeploymentProps {\n Src = new DockerImageName(\"javacs3/nginx:latest\", \"username:password\"),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n Dest = new DockerImageName($\"{cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\")\n}).AddToPrincipalPolicy(new PolicyStatement(new PolicyStatementProps {\n Effect = Effect.ALLOW,\n Actions = new [] { \"secretsmanager:GetSecretValue\" },\n Resources = new [] { \"*\" }\n}));","version":"1"},"java":{"source":"import software.amazon.awscdk.services.ecr.assets.DockerImageAsset;\n\n\nDockerImageAsset image = DockerImageAsset.Builder.create(this, \"CDKDockerImage\")\n .directory(join(__dirname, \"docker\"))\n .build();\n\n// Copy from cdk docker image asset to another ECR.\n// Copy from cdk docker image asset to another ECR.\nECRDeployment.Builder.create(this, \"DeployDockerImage1\")\n .src(new DockerImageName(image.getImageUri()))\n .dest(new DockerImageName(String.format(\"%s.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\", Aws.ACCOUNT_ID)))\n .build();\n\n// Copy from docker registry to ECR.\n// Copy from docker registry to ECR.\nECRDeployment.Builder.create(this, \"DeployDockerImage2\")\n .src(new DockerImageName(\"nginx:latest\"))\n .dest(new DockerImageName(String.format(\"%s.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\", Aws.ACCOUNT_ID)))\n .build();\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nECRDeployment.Builder.create(this, \"DeployDockerImage3\")\n .src(new DockerImageName(\"javacs3/nginx:latest\", \"username:password\"))\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n .dest(new DockerImageName(String.format(\"%s.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\", Aws.ACCOUNT_ID)))\n .build().addToPrincipalPolicy(PolicyStatement.Builder.create()\n .effect(Effect.ALLOW)\n .actions(List.of(\"secretsmanager:GetSecretValue\"))\n .resources(List.of(\"*\"))\n .build());","version":"1"},"go":{"source":"import \"github.com/aws/aws-cdk-go/awscdk\"\n\n\nimage := awscdk.NewDockerImageAsset(this, jsii.String(\"CDKDockerImage\"), &DockerImageAssetProps{\n\tDirectory: path.join(__dirname, jsii.String(\"docker\")),\n})\n\n// Copy from cdk docker image asset to another ECR.\n// Copy from cdk docker image asset to another ECR.\necrdeploy.NewECRDeployment(this, jsii.String(\"DeployDockerImage1\"), &ECRDeploymentProps{\n\tSrc: ecrdeploy.NewDockerImageName(image.ImageUri),\n\tDest: ecrdeploy.NewDockerImageName(fmt.Sprintf(\"%v.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest\", cdk.Aws_ACCOUNT_ID())),\n})\n\n// Copy from docker registry to ECR.\n// Copy from docker registry to ECR.\necrdeploy.NewECRDeployment(this, jsii.String(\"DeployDockerImage2\"), &ECRDeploymentProps{\n\tSrc: ecrdeploy.NewDockerImageName(jsii.String(\"nginx:latest\")),\n\tDest: ecrdeploy.NewDockerImageName(fmt.Sprintf(\"%v.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest\", cdk.Aws_ACCOUNT_ID())),\n})\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\necrdeploy.NewECRDeployment(this, jsii.String(\"DeployDockerImage3\"), &ECRDeploymentProps{\n\tSrc: ecrdeploy.NewDockerImageName(jsii.String(\"javacs3/nginx:latest\"), jsii.String(\"username:password\")),\n\t// src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n\t// src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n\tDest: ecrdeploy.NewDockerImageName(fmt.Sprintf(\"%v.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest\", cdk.Aws_ACCOUNT_ID())),\n}).AddToPrincipalPolicy(awscdk.Aws_iam.NewPolicyStatement(&PolicyStatementProps{\n\tEffect: awscdk.*Aws_iam.Effect_ALLOW,\n\tActions: []*string{\n\t\tjsii.String(\"secretsmanager:GetSecretValue\"),\n\t},\n\tResources: []*string{\n\t\tjsii.String(\"*\"),\n\t},\n}))","version":"1"},"$":{"source":"import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\n\nconst image = new DockerImageAsset(this, 'CDKDockerImage', {\n directory: path.join(__dirname, 'docker'),\n});\n\n// Copy from cdk docker image asset to another ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage1', {\n src: new ecrdeploy.DockerImageName(image.imageUri),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest`),\n});\n\n// Copy from docker registry to ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage2', {\n src: new ecrdeploy.DockerImageName('nginx:latest'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest`),\n});\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage3', {\n src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'username:password'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest`),\n}).addToPrincipalPolicy(new iam.PolicyStatement({\n effect: iam.Effect.ALLOW,\n actions: [\n 'secretsmanager:GetSecretValue',\n ],\n resources: ['*'],\n}));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-ecr-deployment"},"field":{"field":"markdown","line":33}},"didCompile":true,"fqnsReferenced":["aws-cdk-lib.aws_ecr_assets.DockerImageAsset","aws-cdk-lib.aws_ecr_assets.DockerImageAsset#imageUri","aws-cdk-lib.aws_ecr_assets.DockerImageAssetProps","aws-cdk-lib.aws_iam.Effect","aws-cdk-lib.aws_iam.Effect#ALLOW","aws-cdk-lib.aws_iam.PolicyStatement","aws-cdk-lib.aws_iam.PolicyStatementProps","cdk-ecr-deployment.DockerImageName","cdk-ecr-deployment.ECRDeployment","cdk-ecr-deployment.ECRDeployment#addToPrincipalPolicy","cdk-ecr-deployment.ECRDeploymentProps","cdk-ecr-deployment.IImageName","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport * as path from 'node:path';\nimport { Construct } from 'constructs';\n import * as ecrdeploy from 'cdk-ecr-deployment';\nimport {\n Stack,\n aws_iam as iam,\n} from 'aws-cdk-lib';\nimport * as cdk from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst image = new DockerImageAsset(this, 'CDKDockerImage', {\n directory: path.join(__dirname, 'docker'),\n});\n\n// Copy from cdk docker image asset to another ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage1', {\n src: new ecrdeploy.DockerImageName(image.imageUri),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx:latest`),\n});\n\n// Copy from docker registry to ECR.\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage2', {\n src: new ecrdeploy.DockerImageName('nginx:latest'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx2:latest`),\n});\n\n// Copy from private docker registry to ECR.\n// The format of secret in aws secrets manager must be plain text! e.g. <username>:<password>\nnew ecrdeploy.ECRDeployment(this, 'DeployDockerImage3', {\n src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'username:password'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'aws-secrets-manager-secret-name'),\n // src: new ecrdeploy.DockerImageName('javacs3/nginx:latest', 'arn:aws:secretsmanager:us-west-2:000000000000:secret:id'),\n dest: new ecrdeploy.DockerImageName(`${cdk.Aws.ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/my-nginx3:latest`),\n}).addToPrincipalPolicy(new iam.PolicyStatement({\n effect: iam.Effect.ALLOW,\n actions: [\n 'secretsmanager:GetSecretValue',\n ],\n resources: ['*'],\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":11,"16":3,"18":3,"80":51,"110":4,"209":2,"210":5,"211":21,"213":2,"214":11,"228":3,"239":3,"243":1,"244":3,"260":1,"261":1,"272":1,"273":1,"275":1,"276":1,"303":10,"312":1},"fqnsFingerprint":"49c3b893d162beea6924f8cf712357c6390954e35a181bc42817e82aa4070d12"}}}
|
package/lib/index.js
CHANGED
|
@@ -37,7 +37,7 @@ class DockerImageName {
|
|
|
37
37
|
}
|
|
38
38
|
exports.DockerImageName = DockerImageName;
|
|
39
39
|
_a = JSII_RTTI_SYMBOL_1;
|
|
40
|
-
DockerImageName[_a] = { fqn: "cdk-ecr-deployment.DockerImageName", version: "3.0.
|
|
40
|
+
DockerImageName[_a] = { fqn: "cdk-ecr-deployment.DockerImageName", version: "3.0.78" };
|
|
41
41
|
class S3ArchiveName {
|
|
42
42
|
constructor(p, ref, creds) {
|
|
43
43
|
this.creds = creds;
|
|
@@ -50,7 +50,7 @@ class S3ArchiveName {
|
|
|
50
50
|
}
|
|
51
51
|
exports.S3ArchiveName = S3ArchiveName;
|
|
52
52
|
_b = JSII_RTTI_SYMBOL_1;
|
|
53
|
-
S3ArchiveName[_b] = { fqn: "cdk-ecr-deployment.S3ArchiveName", version: "3.0.
|
|
53
|
+
S3ArchiveName[_b] = { fqn: "cdk-ecr-deployment.S3ArchiveName", version: "3.0.78" };
|
|
54
54
|
class ECRDeployment extends constructs_1.Construct {
|
|
55
55
|
constructor(scope, id, props) {
|
|
56
56
|
super(scope, id);
|
|
@@ -134,5 +134,5 @@ class ECRDeployment extends constructs_1.Construct {
|
|
|
134
134
|
}
|
|
135
135
|
exports.ECRDeployment = ECRDeployment;
|
|
136
136
|
_c = JSII_RTTI_SYMBOL_1;
|
|
137
|
-
ECRDeployment[_c] = { fqn: "cdk-ecr-deployment.ECRDeployment", version: "3.0.
|
|
137
|
+
ECRDeployment[_c] = { fqn: "cdk-ecr-deployment.ECRDeployment", version: "3.0.78" };
|
|
138
138
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxRUFBcUU7QUFDckUsc0NBQXNDO0FBR3RDLCtDQUErQztBQUMvQyw2QkFBNkI7QUFDN0IsNkNBQW9IO0FBRXBILDJDQUF1QztBQUN2QyxxQ0FBbUQ7QUFzR25ELFNBQVMsT0FBTyxDQUFDLFVBQWtCO0lBQ2pDLElBQUksSUFBQSxnQ0FBdUIsR0FBRSxFQUFFO1FBQzdCLElBQUk7WUFDRixNQUFNLGFBQWEsR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J5TGltaXQudG9TdHJpbmcoKX1NaUJgO1xuICAgIH1cblxuICAgIHJldHVybiB1dWlkO1xuICB9XG59XG4iXX0=
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 31 Jul 2024 17:36:20 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -346,20 +346,20 @@ declare module "dns/promises" {
|
|
|
346
346
|
*/
|
|
347
347
|
function setServers(servers: readonly string[]): void;
|
|
348
348
|
/**
|
|
349
|
-
* Set the default value of `
|
|
349
|
+
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
350
|
+
* The value could be:
|
|
350
351
|
*
|
|
351
|
-
* * `ipv4first`: sets default `
|
|
352
|
-
* * `
|
|
353
|
-
* * `verbatim`: sets default `order` to `verbatim`.
|
|
352
|
+
* * `ipv4first`: sets default `verbatim` to `false`.
|
|
353
|
+
* * `verbatim`: sets default `verbatim` to `true`.
|
|
354
354
|
*
|
|
355
|
-
* The default is `verbatim` and
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
355
|
+
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
356
|
+
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
|
|
357
|
+
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
358
|
+
* thread won't affect the default dns orders in workers.
|
|
359
359
|
* @since v16.4.0, v14.18.0
|
|
360
|
-
* @param order must be `'ipv4first'
|
|
360
|
+
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
361
361
|
*/
|
|
362
|
-
function setDefaultResultOrder(order: "ipv4first" | "
|
|
362
|
+
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
363
363
|
// Error codes
|
|
364
364
|
const NODATA: "ENODATA";
|
|
365
365
|
const FORMERR: "EFORMERR";
|
|
@@ -80,20 +80,11 @@ declare module "dns" {
|
|
|
80
80
|
* @default false
|
|
81
81
|
*/
|
|
82
82
|
all?: boolean | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
|
85
|
-
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
|
86
|
-
* addresses before IPv4 addresses. Default value is configurable using
|
|
87
|
-
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
|
|
88
|
-
* @default `verbatim` (addresses are not reordered)
|
|
89
|
-
*/
|
|
90
|
-
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
|
|
91
83
|
/**
|
|
92
84
|
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
|
|
93
|
-
* addresses are placed before IPv6 addresses.
|
|
94
|
-
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
|
|
85
|
+
* addresses are placed before IPv6 addresses. Default value is configurable using {@link setDefaultResultOrder}
|
|
95
86
|
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
|
|
96
|
-
* @default true
|
|
87
|
+
* @default true
|
|
97
88
|
*/
|
|
98
89
|
verbatim?: boolean | undefined;
|
|
99
90
|
}
|
|
@@ -672,15 +663,14 @@ declare module "dns" {
|
|
|
672
663
|
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
|
673
664
|
): void;
|
|
674
665
|
/**
|
|
675
|
-
* Get the default value for `
|
|
666
|
+
* Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
676
667
|
* The value could be:
|
|
677
668
|
*
|
|
678
|
-
* * `ipv4first`: for `
|
|
679
|
-
* * `
|
|
680
|
-
* * `verbatim`: for `order` defaulting to `verbatim`.
|
|
669
|
+
* * `ipv4first`: for `verbatim` defaulting to `false`.
|
|
670
|
+
* * `verbatim`: for `verbatim` defaulting to `true`.
|
|
681
671
|
* @since v18.17.0
|
|
682
672
|
*/
|
|
683
|
-
export function getDefaultResultOrder(): "ipv4first" | "
|
|
673
|
+
export function getDefaultResultOrder(): "ipv4first" | "verbatim";
|
|
684
674
|
/**
|
|
685
675
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
686
676
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
|
@@ -727,21 +717,19 @@ declare module "dns" {
|
|
|
727
717
|
*/
|
|
728
718
|
export function getServers(): string[];
|
|
729
719
|
/**
|
|
730
|
-
* Set the default value of `
|
|
720
|
+
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
731
721
|
* The value could be:
|
|
732
722
|
*
|
|
733
|
-
* * `ipv4first`: sets default `
|
|
734
|
-
* * `
|
|
735
|
-
* * `verbatim`: sets default `order` to `verbatim`.
|
|
723
|
+
* * `ipv4first`: sets default `verbatim` to `false`.
|
|
724
|
+
* * `verbatim`: sets default `verbatim` to `true`.
|
|
736
725
|
*
|
|
737
726
|
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
738
727
|
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
|
|
739
728
|
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
740
729
|
* thread won't affect the default dns orders in workers.
|
|
741
730
|
* @since v16.4.0, v14.18.0
|
|
742
|
-
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
|
743
731
|
*/
|
|
744
|
-
export function setDefaultResultOrder(order: "ipv4first" | "
|
|
732
|
+
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
745
733
|
// Error codes
|
|
746
734
|
export const NODATA: "ENODATA";
|
|
747
735
|
export const FORMERR: "EFORMERR";
|
|
@@ -21,8 +21,6 @@ declare module "fs/promises" {
|
|
|
21
21
|
Dir,
|
|
22
22
|
Dirent,
|
|
23
23
|
GlobOptions,
|
|
24
|
-
GlobOptionsWithFileTypes,
|
|
25
|
-
GlobOptionsWithoutFileTypes,
|
|
26
24
|
MakeDirectoryOptions,
|
|
27
25
|
Mode,
|
|
28
26
|
ObjectEncodingOptions,
|
|
@@ -1245,16 +1243,7 @@ declare module "fs/promises" {
|
|
|
1245
1243
|
/**
|
|
1246
1244
|
* Retrieves the files matching the specified pattern.
|
|
1247
1245
|
*/
|
|
1248
|
-
function glob(pattern: string | string[]): AsyncIterableIterator<string>;
|
|
1249
|
-
/**
|
|
1250
|
-
* Retrieves the files matching the specified pattern.
|
|
1251
|
-
*/
|
|
1252
|
-
function glob<Options extends GlobOptions>(
|
|
1253
|
-
pattern: string | string[],
|
|
1254
|
-
opt: Options,
|
|
1255
|
-
): Options extends GlobOptionsWithFileTypes ? AsyncIterableIterator<Dirent>
|
|
1256
|
-
: Options extends GlobOptionsWithoutFileTypes ? AsyncIterableIterator<string>
|
|
1257
|
-
: AsyncIterableIterator<Dirent> | AsyncIterableIterator<string>;
|
|
1246
|
+
function glob(pattern: string | string[], options?: GlobOptions): AsyncIterableIterator<string>;
|
|
1258
1247
|
}
|
|
1259
1248
|
declare module "node:fs/promises" {
|
|
1260
1249
|
export * from "fs/promises";
|
|
@@ -4324,17 +4324,6 @@ declare module "fs" {
|
|
|
4324
4324
|
* Function to filter out files/directories. Return true to exclude the item, false to include it.
|
|
4325
4325
|
*/
|
|
4326
4326
|
exclude?: ((fileName: string) => boolean) | undefined;
|
|
4327
|
-
/**
|
|
4328
|
-
* `true` if the glob should return paths as `Dirent`s, `false` otherwise.
|
|
4329
|
-
* @default false
|
|
4330
|
-
*/
|
|
4331
|
-
withFileTypes?: boolean | undefined;
|
|
4332
|
-
}
|
|
4333
|
-
export interface GlobOptionsWithFileTypes extends GlobOptions {
|
|
4334
|
-
withFileTypes: true;
|
|
4335
|
-
}
|
|
4336
|
-
export interface GlobOptionsWithoutFileTypes extends GlobOptions {
|
|
4337
|
-
withFileTypes?: false | undefined;
|
|
4338
4327
|
}
|
|
4339
4328
|
/**
|
|
4340
4329
|
* Retrieves the files matching the specified pattern.
|
|
@@ -4343,32 +4332,15 @@ declare module "fs" {
|
|
|
4343
4332
|
pattern: string | string[],
|
|
4344
4333
|
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4345
4334
|
): void;
|
|
4346
|
-
|
|
4347
|
-
* Retrieves the files matching the specified pattern.
|
|
4348
|
-
*/
|
|
4349
|
-
export function glob<Options extends GlobOptions>(
|
|
4335
|
+
export function glob(
|
|
4350
4336
|
pattern: string | string[],
|
|
4351
|
-
options:
|
|
4352
|
-
callback: (
|
|
4353
|
-
err: NodeJS.ErrnoException | null,
|
|
4354
|
-
matches: Options extends GlobOptionsWithFileTypes ? Dirent[]
|
|
4355
|
-
: Options extends GlobOptionsWithoutFileTypes ? string[]
|
|
4356
|
-
: Dirent[] | string[],
|
|
4357
|
-
) => void,
|
|
4337
|
+
options: GlobOptions,
|
|
4338
|
+
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4358
4339
|
): void;
|
|
4359
4340
|
/**
|
|
4360
4341
|
* Retrieves the files matching the specified pattern.
|
|
4361
4342
|
*/
|
|
4362
|
-
export function globSync(pattern: string | string[]): string[];
|
|
4363
|
-
/**
|
|
4364
|
-
* Retrieves the files matching the specified pattern.
|
|
4365
|
-
*/
|
|
4366
|
-
export function globSync<Options extends GlobOptions>(
|
|
4367
|
-
pattern: string | string[],
|
|
4368
|
-
options: Options,
|
|
4369
|
-
): Options extends GlobOptionsWithFileTypes ? Dirent[]
|
|
4370
|
-
: Options extends GlobOptionsWithoutFileTypes ? string[]
|
|
4371
|
-
: Dirent[] | string[];
|
|
4343
|
+
export function globSync(pattern: string | string[], options?: GlobOptions): string[];
|
|
4372
4344
|
}
|
|
4373
4345
|
declare module "node:fs" {
|
|
4374
4346
|
export * from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -212,6 +212,6 @@
|
|
|
212
212
|
"dependencies": {
|
|
213
213
|
"undici-types": "~6.11.1"
|
|
214
214
|
},
|
|
215
|
-
"typesPublisherContentHash": "
|
|
215
|
+
"typesPublisherContentHash": "812418de0c8a4d6f3dd51da81aeba50ecf77191b22dd1bb7c8f56be32e512105",
|
|
216
216
|
"typeScriptVersion": "4.8"
|
|
217
217
|
}
|
|
@@ -941,17 +941,6 @@ declare module "node:test" {
|
|
|
941
941
|
* @since v19.1.0, v18.13.0
|
|
942
942
|
*/
|
|
943
943
|
restoreAll(): void;
|
|
944
|
-
/**
|
|
945
|
-
* This function is used to mock the exports of ECMAScript modules,
|
|
946
|
-
* CommonJS modules, and Node.js builtin modules. Any references to
|
|
947
|
-
* the original module prior to mocking are not impacted
|
|
948
|
-
* @since v22.3.0
|
|
949
|
-
*/
|
|
950
|
-
module(speficier: string, options?: {
|
|
951
|
-
cache?: boolean;
|
|
952
|
-
defaultExport?: any;
|
|
953
|
-
namedExports?: object;
|
|
954
|
-
}): { restore: () => void };
|
|
955
944
|
timers: MockTimers;
|
|
956
945
|
}
|
|
957
946
|
const mock: MockTracker;
|
|
@@ -46,14 +46,6 @@ declare module "url" {
|
|
|
46
46
|
interface UrlWithStringQuery extends Url {
|
|
47
47
|
query: string | null;
|
|
48
48
|
}
|
|
49
|
-
interface FileUrlToPathOptions {
|
|
50
|
-
/**
|
|
51
|
-
* `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default.
|
|
52
|
-
* @default undefined
|
|
53
|
-
*/
|
|
54
|
-
windows?: boolean | undefined;
|
|
55
|
-
}
|
|
56
|
-
interface PathToFileUrlOptions extends FileUrlToPathOptions {}
|
|
57
49
|
/**
|
|
58
50
|
* The `url.parse()` method takes a URL string, parses it, and returns a URL
|
|
59
51
|
* object.
|
|
@@ -306,7 +298,7 @@ declare module "url" {
|
|
|
306
298
|
* @param url The file URL string or URL object to convert to a path.
|
|
307
299
|
* @return The fully-resolved platform-specific Node.js file path.
|
|
308
300
|
*/
|
|
309
|
-
function fileURLToPath(url: string | URL
|
|
301
|
+
function fileURLToPath(url: string | URL): string;
|
|
310
302
|
/**
|
|
311
303
|
* This function ensures that `path` is resolved absolutely, and that the URL
|
|
312
304
|
* control characters are correctly encoded when converting into a File URL.
|
|
@@ -324,7 +316,7 @@ declare module "url" {
|
|
|
324
316
|
* @param path The path to convert to a File URL.
|
|
325
317
|
* @return The file URL object.
|
|
326
318
|
*/
|
|
327
|
-
function pathToFileURL(path: string
|
|
319
|
+
function pathToFileURL(path: string): URL;
|
|
328
320
|
/**
|
|
329
321
|
* This utility function converts a URL object into an ordinary options object as
|
|
330
322
|
* expected by the `http.request()` and `https.request()` APIs.
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 31 Jul 2024 17:36:20 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -346,20 +346,20 @@ declare module "dns/promises" {
|
|
|
346
346
|
*/
|
|
347
347
|
function setServers(servers: readonly string[]): void;
|
|
348
348
|
/**
|
|
349
|
-
* Set the default value of `
|
|
349
|
+
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
350
|
+
* The value could be:
|
|
350
351
|
*
|
|
351
|
-
* * `ipv4first`: sets default `
|
|
352
|
-
* * `
|
|
353
|
-
* * `verbatim`: sets default `order` to `verbatim`.
|
|
352
|
+
* * `ipv4first`: sets default `verbatim` to `false`.
|
|
353
|
+
* * `verbatim`: sets default `verbatim` to `true`.
|
|
354
354
|
*
|
|
355
|
-
* The default is `verbatim` and
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
355
|
+
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
356
|
+
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
|
|
357
|
+
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
358
|
+
* thread won't affect the default dns orders in workers.
|
|
359
359
|
* @since v16.4.0, v14.18.0
|
|
360
|
-
* @param order must be `'ipv4first'
|
|
360
|
+
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
361
361
|
*/
|
|
362
|
-
function setDefaultResultOrder(order: "ipv4first" | "
|
|
362
|
+
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
363
363
|
// Error codes
|
|
364
364
|
const NODATA: "ENODATA";
|
|
365
365
|
const FORMERR: "EFORMERR";
|
|
@@ -80,20 +80,11 @@ declare module "dns" {
|
|
|
80
80
|
* @default false
|
|
81
81
|
*/
|
|
82
82
|
all?: boolean | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
|
85
|
-
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
|
86
|
-
* addresses before IPv4 addresses. Default value is configurable using
|
|
87
|
-
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
|
|
88
|
-
* @default `verbatim` (addresses are not reordered)
|
|
89
|
-
*/
|
|
90
|
-
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
|
|
91
83
|
/**
|
|
92
84
|
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
|
|
93
|
-
* addresses are placed before IPv6 addresses.
|
|
94
|
-
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
|
|
85
|
+
* addresses are placed before IPv6 addresses. Default value is configurable using {@link setDefaultResultOrder}
|
|
95
86
|
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
|
|
96
|
-
* @default true
|
|
87
|
+
* @default true
|
|
97
88
|
*/
|
|
98
89
|
verbatim?: boolean | undefined;
|
|
99
90
|
}
|
|
@@ -672,15 +663,14 @@ declare module "dns" {
|
|
|
672
663
|
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
|
673
664
|
): void;
|
|
674
665
|
/**
|
|
675
|
-
* Get the default value for `
|
|
666
|
+
* Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
676
667
|
* The value could be:
|
|
677
668
|
*
|
|
678
|
-
* * `ipv4first`: for `
|
|
679
|
-
* * `
|
|
680
|
-
* * `verbatim`: for `order` defaulting to `verbatim`.
|
|
669
|
+
* * `ipv4first`: for `verbatim` defaulting to `false`.
|
|
670
|
+
* * `verbatim`: for `verbatim` defaulting to `true`.
|
|
681
671
|
* @since v18.17.0
|
|
682
672
|
*/
|
|
683
|
-
export function getDefaultResultOrder(): "ipv4first" | "
|
|
673
|
+
export function getDefaultResultOrder(): "ipv4first" | "verbatim";
|
|
684
674
|
/**
|
|
685
675
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
686
676
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
|
@@ -727,21 +717,19 @@ declare module "dns" {
|
|
|
727
717
|
*/
|
|
728
718
|
export function getServers(): string[];
|
|
729
719
|
/**
|
|
730
|
-
* Set the default value of `
|
|
720
|
+
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
731
721
|
* The value could be:
|
|
732
722
|
*
|
|
733
|
-
* * `ipv4first`: sets default `
|
|
734
|
-
* * `
|
|
735
|
-
* * `verbatim`: sets default `order` to `verbatim`.
|
|
723
|
+
* * `ipv4first`: sets default `verbatim` to `false`.
|
|
724
|
+
* * `verbatim`: sets default `verbatim` to `true`.
|
|
736
725
|
*
|
|
737
726
|
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
738
727
|
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
|
|
739
728
|
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
740
729
|
* thread won't affect the default dns orders in workers.
|
|
741
730
|
* @since v16.4.0, v14.18.0
|
|
742
|
-
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
|
743
731
|
*/
|
|
744
|
-
export function setDefaultResultOrder(order: "ipv4first" | "
|
|
732
|
+
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
745
733
|
// Error codes
|
|
746
734
|
export const NODATA: "ENODATA";
|
|
747
735
|
export const FORMERR: "EFORMERR";
|
|
@@ -21,8 +21,6 @@ declare module "fs/promises" {
|
|
|
21
21
|
Dir,
|
|
22
22
|
Dirent,
|
|
23
23
|
GlobOptions,
|
|
24
|
-
GlobOptionsWithFileTypes,
|
|
25
|
-
GlobOptionsWithoutFileTypes,
|
|
26
24
|
MakeDirectoryOptions,
|
|
27
25
|
Mode,
|
|
28
26
|
ObjectEncodingOptions,
|
|
@@ -1245,16 +1243,7 @@ declare module "fs/promises" {
|
|
|
1245
1243
|
/**
|
|
1246
1244
|
* Retrieves the files matching the specified pattern.
|
|
1247
1245
|
*/
|
|
1248
|
-
function glob(pattern: string | string[]): AsyncIterableIterator<string>;
|
|
1249
|
-
/**
|
|
1250
|
-
* Retrieves the files matching the specified pattern.
|
|
1251
|
-
*/
|
|
1252
|
-
function glob<Options extends GlobOptions>(
|
|
1253
|
-
pattern: string | string[],
|
|
1254
|
-
opt: Options,
|
|
1255
|
-
): Options extends GlobOptionsWithFileTypes ? AsyncIterableIterator<Dirent>
|
|
1256
|
-
: Options extends GlobOptionsWithoutFileTypes ? AsyncIterableIterator<string>
|
|
1257
|
-
: AsyncIterableIterator<Dirent> | AsyncIterableIterator<string>;
|
|
1246
|
+
function glob(pattern: string | string[], options?: GlobOptions): AsyncIterableIterator<string>;
|
|
1258
1247
|
}
|
|
1259
1248
|
declare module "node:fs/promises" {
|
|
1260
1249
|
export * from "fs/promises";
|
|
@@ -4324,17 +4324,6 @@ declare module "fs" {
|
|
|
4324
4324
|
* Function to filter out files/directories. Return true to exclude the item, false to include it.
|
|
4325
4325
|
*/
|
|
4326
4326
|
exclude?: ((fileName: string) => boolean) | undefined;
|
|
4327
|
-
/**
|
|
4328
|
-
* `true` if the glob should return paths as `Dirent`s, `false` otherwise.
|
|
4329
|
-
* @default false
|
|
4330
|
-
*/
|
|
4331
|
-
withFileTypes?: boolean | undefined;
|
|
4332
|
-
}
|
|
4333
|
-
export interface GlobOptionsWithFileTypes extends GlobOptions {
|
|
4334
|
-
withFileTypes: true;
|
|
4335
|
-
}
|
|
4336
|
-
export interface GlobOptionsWithoutFileTypes extends GlobOptions {
|
|
4337
|
-
withFileTypes?: false | undefined;
|
|
4338
4327
|
}
|
|
4339
4328
|
/**
|
|
4340
4329
|
* Retrieves the files matching the specified pattern.
|
|
@@ -4343,32 +4332,15 @@ declare module "fs" {
|
|
|
4343
4332
|
pattern: string | string[],
|
|
4344
4333
|
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4345
4334
|
): void;
|
|
4346
|
-
|
|
4347
|
-
* Retrieves the files matching the specified pattern.
|
|
4348
|
-
*/
|
|
4349
|
-
export function glob<Options extends GlobOptions>(
|
|
4335
|
+
export function glob(
|
|
4350
4336
|
pattern: string | string[],
|
|
4351
|
-
options:
|
|
4352
|
-
callback: (
|
|
4353
|
-
err: NodeJS.ErrnoException | null,
|
|
4354
|
-
matches: Options extends GlobOptionsWithFileTypes ? Dirent[]
|
|
4355
|
-
: Options extends GlobOptionsWithoutFileTypes ? string[]
|
|
4356
|
-
: Dirent[] | string[],
|
|
4357
|
-
) => void,
|
|
4337
|
+
options: GlobOptions,
|
|
4338
|
+
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4358
4339
|
): void;
|
|
4359
4340
|
/**
|
|
4360
4341
|
* Retrieves the files matching the specified pattern.
|
|
4361
4342
|
*/
|
|
4362
|
-
export function globSync(pattern: string | string[]): string[];
|
|
4363
|
-
/**
|
|
4364
|
-
* Retrieves the files matching the specified pattern.
|
|
4365
|
-
*/
|
|
4366
|
-
export function globSync<Options extends GlobOptions>(
|
|
4367
|
-
pattern: string | string[],
|
|
4368
|
-
options: Options,
|
|
4369
|
-
): Options extends GlobOptionsWithFileTypes ? Dirent[]
|
|
4370
|
-
: Options extends GlobOptionsWithoutFileTypes ? string[]
|
|
4371
|
-
: Dirent[] | string[];
|
|
4343
|
+
export function globSync(pattern: string | string[], options?: GlobOptions): string[];
|
|
4372
4344
|
}
|
|
4373
4345
|
declare module "node:fs" {
|
|
4374
4346
|
export * from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -212,6 +212,6 @@
|
|
|
212
212
|
"dependencies": {
|
|
213
213
|
"undici-types": "~6.11.1"
|
|
214
214
|
},
|
|
215
|
-
"typesPublisherContentHash": "
|
|
215
|
+
"typesPublisherContentHash": "812418de0c8a4d6f3dd51da81aeba50ecf77191b22dd1bb7c8f56be32e512105",
|
|
216
216
|
"typeScriptVersion": "4.8"
|
|
217
217
|
}
|
|
@@ -941,17 +941,6 @@ declare module "node:test" {
|
|
|
941
941
|
* @since v19.1.0, v18.13.0
|
|
942
942
|
*/
|
|
943
943
|
restoreAll(): void;
|
|
944
|
-
/**
|
|
945
|
-
* This function is used to mock the exports of ECMAScript modules,
|
|
946
|
-
* CommonJS modules, and Node.js builtin modules. Any references to
|
|
947
|
-
* the original module prior to mocking are not impacted
|
|
948
|
-
* @since v22.3.0
|
|
949
|
-
*/
|
|
950
|
-
module(speficier: string, options?: {
|
|
951
|
-
cache?: boolean;
|
|
952
|
-
defaultExport?: any;
|
|
953
|
-
namedExports?: object;
|
|
954
|
-
}): { restore: () => void };
|
|
955
944
|
timers: MockTimers;
|
|
956
945
|
}
|
|
957
946
|
const mock: MockTracker;
|
|
@@ -46,14 +46,6 @@ declare module "url" {
|
|
|
46
46
|
interface UrlWithStringQuery extends Url {
|
|
47
47
|
query: string | null;
|
|
48
48
|
}
|
|
49
|
-
interface FileUrlToPathOptions {
|
|
50
|
-
/**
|
|
51
|
-
* `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default.
|
|
52
|
-
* @default undefined
|
|
53
|
-
*/
|
|
54
|
-
windows?: boolean | undefined;
|
|
55
|
-
}
|
|
56
|
-
interface PathToFileUrlOptions extends FileUrlToPathOptions {}
|
|
57
49
|
/**
|
|
58
50
|
* The `url.parse()` method takes a URL string, parses it, and returns a URL
|
|
59
51
|
* object.
|
|
@@ -306,7 +298,7 @@ declare module "url" {
|
|
|
306
298
|
* @param url The file URL string or URL object to convert to a path.
|
|
307
299
|
* @return The fully-resolved platform-specific Node.js file path.
|
|
308
300
|
*/
|
|
309
|
-
function fileURLToPath(url: string | URL
|
|
301
|
+
function fileURLToPath(url: string | URL): string;
|
|
310
302
|
/**
|
|
311
303
|
* This function ensures that `path` is resolved absolutely, and that the URL
|
|
312
304
|
* control characters are correctly encoded when converting into a File URL.
|
|
@@ -324,7 +316,7 @@ declare module "url" {
|
|
|
324
316
|
* @param path The path to convert to a File URL.
|
|
325
317
|
* @return The file URL object.
|
|
326
318
|
*/
|
|
327
|
-
function pathToFileURL(path: string
|
|
319
|
+
function pathToFileURL(path: string): URL;
|
|
328
320
|
/**
|
|
329
321
|
* This utility function converts a URL object into an ordinary options object as
|
|
330
322
|
* expected by the `http.request()` and `https.request()` APIs.
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 31 Jul 2024 17:36:20 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -346,20 +346,20 @@ declare module "dns/promises" {
|
|
|
346
346
|
*/
|
|
347
347
|
function setServers(servers: readonly string[]): void;
|
|
348
348
|
/**
|
|
349
|
-
* Set the default value of `
|
|
349
|
+
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
350
|
+
* The value could be:
|
|
350
351
|
*
|
|
351
|
-
* * `ipv4first`: sets default `
|
|
352
|
-
* * `
|
|
353
|
-
* * `verbatim`: sets default `order` to `verbatim`.
|
|
352
|
+
* * `ipv4first`: sets default `verbatim` to `false`.
|
|
353
|
+
* * `verbatim`: sets default `verbatim` to `true`.
|
|
354
354
|
*
|
|
355
|
-
* The default is `verbatim` and
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
355
|
+
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
356
|
+
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
|
|
357
|
+
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
358
|
+
* thread won't affect the default dns orders in workers.
|
|
359
359
|
* @since v16.4.0, v14.18.0
|
|
360
|
-
* @param order must be `'ipv4first'
|
|
360
|
+
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
361
361
|
*/
|
|
362
|
-
function setDefaultResultOrder(order: "ipv4first" | "
|
|
362
|
+
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
363
363
|
// Error codes
|
|
364
364
|
const NODATA: "ENODATA";
|
|
365
365
|
const FORMERR: "EFORMERR";
|
|
@@ -80,20 +80,11 @@ declare module "dns" {
|
|
|
80
80
|
* @default false
|
|
81
81
|
*/
|
|
82
82
|
all?: boolean | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
|
85
|
-
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
|
86
|
-
* addresses before IPv4 addresses. Default value is configurable using
|
|
87
|
-
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
|
|
88
|
-
* @default `verbatim` (addresses are not reordered)
|
|
89
|
-
*/
|
|
90
|
-
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
|
|
91
83
|
/**
|
|
92
84
|
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
|
|
93
|
-
* addresses are placed before IPv6 addresses.
|
|
94
|
-
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
|
|
85
|
+
* addresses are placed before IPv6 addresses. Default value is configurable using {@link setDefaultResultOrder}
|
|
95
86
|
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
|
|
96
|
-
* @default true
|
|
87
|
+
* @default true
|
|
97
88
|
*/
|
|
98
89
|
verbatim?: boolean | undefined;
|
|
99
90
|
}
|
|
@@ -672,15 +663,14 @@ declare module "dns" {
|
|
|
672
663
|
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
|
673
664
|
): void;
|
|
674
665
|
/**
|
|
675
|
-
* Get the default value for `
|
|
666
|
+
* Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
676
667
|
* The value could be:
|
|
677
668
|
*
|
|
678
|
-
* * `ipv4first`: for `
|
|
679
|
-
* * `
|
|
680
|
-
* * `verbatim`: for `order` defaulting to `verbatim`.
|
|
669
|
+
* * `ipv4first`: for `verbatim` defaulting to `false`.
|
|
670
|
+
* * `verbatim`: for `verbatim` defaulting to `true`.
|
|
681
671
|
* @since v18.17.0
|
|
682
672
|
*/
|
|
683
|
-
export function getDefaultResultOrder(): "ipv4first" | "
|
|
673
|
+
export function getDefaultResultOrder(): "ipv4first" | "verbatim";
|
|
684
674
|
/**
|
|
685
675
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
686
676
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
|
@@ -727,21 +717,19 @@ declare module "dns" {
|
|
|
727
717
|
*/
|
|
728
718
|
export function getServers(): string[];
|
|
729
719
|
/**
|
|
730
|
-
* Set the default value of `
|
|
720
|
+
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
731
721
|
* The value could be:
|
|
732
722
|
*
|
|
733
|
-
* * `ipv4first`: sets default `
|
|
734
|
-
* * `
|
|
735
|
-
* * `verbatim`: sets default `order` to `verbatim`.
|
|
723
|
+
* * `ipv4first`: sets default `verbatim` to `false`.
|
|
724
|
+
* * `verbatim`: sets default `verbatim` to `true`.
|
|
736
725
|
*
|
|
737
726
|
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
738
727
|
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
|
|
739
728
|
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
740
729
|
* thread won't affect the default dns orders in workers.
|
|
741
730
|
* @since v16.4.0, v14.18.0
|
|
742
|
-
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
|
743
731
|
*/
|
|
744
|
-
export function setDefaultResultOrder(order: "ipv4first" | "
|
|
732
|
+
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
745
733
|
// Error codes
|
|
746
734
|
export const NODATA: "ENODATA";
|
|
747
735
|
export const FORMERR: "EFORMERR";
|
|
@@ -21,8 +21,6 @@ declare module "fs/promises" {
|
|
|
21
21
|
Dir,
|
|
22
22
|
Dirent,
|
|
23
23
|
GlobOptions,
|
|
24
|
-
GlobOptionsWithFileTypes,
|
|
25
|
-
GlobOptionsWithoutFileTypes,
|
|
26
24
|
MakeDirectoryOptions,
|
|
27
25
|
Mode,
|
|
28
26
|
ObjectEncodingOptions,
|
|
@@ -1245,16 +1243,7 @@ declare module "fs/promises" {
|
|
|
1245
1243
|
/**
|
|
1246
1244
|
* Retrieves the files matching the specified pattern.
|
|
1247
1245
|
*/
|
|
1248
|
-
function glob(pattern: string | string[]): AsyncIterableIterator<string>;
|
|
1249
|
-
/**
|
|
1250
|
-
* Retrieves the files matching the specified pattern.
|
|
1251
|
-
*/
|
|
1252
|
-
function glob<Options extends GlobOptions>(
|
|
1253
|
-
pattern: string | string[],
|
|
1254
|
-
opt: Options,
|
|
1255
|
-
): Options extends GlobOptionsWithFileTypes ? AsyncIterableIterator<Dirent>
|
|
1256
|
-
: Options extends GlobOptionsWithoutFileTypes ? AsyncIterableIterator<string>
|
|
1257
|
-
: AsyncIterableIterator<Dirent> | AsyncIterableIterator<string>;
|
|
1246
|
+
function glob(pattern: string | string[], options?: GlobOptions): AsyncIterableIterator<string>;
|
|
1258
1247
|
}
|
|
1259
1248
|
declare module "node:fs/promises" {
|
|
1260
1249
|
export * from "fs/promises";
|
|
@@ -4324,17 +4324,6 @@ declare module "fs" {
|
|
|
4324
4324
|
* Function to filter out files/directories. Return true to exclude the item, false to include it.
|
|
4325
4325
|
*/
|
|
4326
4326
|
exclude?: ((fileName: string) => boolean) | undefined;
|
|
4327
|
-
/**
|
|
4328
|
-
* `true` if the glob should return paths as `Dirent`s, `false` otherwise.
|
|
4329
|
-
* @default false
|
|
4330
|
-
*/
|
|
4331
|
-
withFileTypes?: boolean | undefined;
|
|
4332
|
-
}
|
|
4333
|
-
export interface GlobOptionsWithFileTypes extends GlobOptions {
|
|
4334
|
-
withFileTypes: true;
|
|
4335
|
-
}
|
|
4336
|
-
export interface GlobOptionsWithoutFileTypes extends GlobOptions {
|
|
4337
|
-
withFileTypes?: false | undefined;
|
|
4338
4327
|
}
|
|
4339
4328
|
/**
|
|
4340
4329
|
* Retrieves the files matching the specified pattern.
|
|
@@ -4343,32 +4332,15 @@ declare module "fs" {
|
|
|
4343
4332
|
pattern: string | string[],
|
|
4344
4333
|
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4345
4334
|
): void;
|
|
4346
|
-
|
|
4347
|
-
* Retrieves the files matching the specified pattern.
|
|
4348
|
-
*/
|
|
4349
|
-
export function glob<Options extends GlobOptions>(
|
|
4335
|
+
export function glob(
|
|
4350
4336
|
pattern: string | string[],
|
|
4351
|
-
options:
|
|
4352
|
-
callback: (
|
|
4353
|
-
err: NodeJS.ErrnoException | null,
|
|
4354
|
-
matches: Options extends GlobOptionsWithFileTypes ? Dirent[]
|
|
4355
|
-
: Options extends GlobOptionsWithoutFileTypes ? string[]
|
|
4356
|
-
: Dirent[] | string[],
|
|
4357
|
-
) => void,
|
|
4337
|
+
options: GlobOptions,
|
|
4338
|
+
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4358
4339
|
): void;
|
|
4359
4340
|
/**
|
|
4360
4341
|
* Retrieves the files matching the specified pattern.
|
|
4361
4342
|
*/
|
|
4362
|
-
export function globSync(pattern: string | string[]): string[];
|
|
4363
|
-
/**
|
|
4364
|
-
* Retrieves the files matching the specified pattern.
|
|
4365
|
-
*/
|
|
4366
|
-
export function globSync<Options extends GlobOptions>(
|
|
4367
|
-
pattern: string | string[],
|
|
4368
|
-
options: Options,
|
|
4369
|
-
): Options extends GlobOptionsWithFileTypes ? Dirent[]
|
|
4370
|
-
: Options extends GlobOptionsWithoutFileTypes ? string[]
|
|
4371
|
-
: Dirent[] | string[];
|
|
4343
|
+
export function globSync(pattern: string | string[], options?: GlobOptions): string[];
|
|
4372
4344
|
}
|
|
4373
4345
|
declare module "node:fs" {
|
|
4374
4346
|
export * from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -212,6 +212,6 @@
|
|
|
212
212
|
"dependencies": {
|
|
213
213
|
"undici-types": "~6.11.1"
|
|
214
214
|
},
|
|
215
|
-
"typesPublisherContentHash": "
|
|
215
|
+
"typesPublisherContentHash": "812418de0c8a4d6f3dd51da81aeba50ecf77191b22dd1bb7c8f56be32e512105",
|
|
216
216
|
"typeScriptVersion": "4.8"
|
|
217
217
|
}
|
|
@@ -941,17 +941,6 @@ declare module "node:test" {
|
|
|
941
941
|
* @since v19.1.0, v18.13.0
|
|
942
942
|
*/
|
|
943
943
|
restoreAll(): void;
|
|
944
|
-
/**
|
|
945
|
-
* This function is used to mock the exports of ECMAScript modules,
|
|
946
|
-
* CommonJS modules, and Node.js builtin modules. Any references to
|
|
947
|
-
* the original module prior to mocking are not impacted
|
|
948
|
-
* @since v22.3.0
|
|
949
|
-
*/
|
|
950
|
-
module(speficier: string, options?: {
|
|
951
|
-
cache?: boolean;
|
|
952
|
-
defaultExport?: any;
|
|
953
|
-
namedExports?: object;
|
|
954
|
-
}): { restore: () => void };
|
|
955
944
|
timers: MockTimers;
|
|
956
945
|
}
|
|
957
946
|
const mock: MockTracker;
|
|
@@ -46,14 +46,6 @@ declare module "url" {
|
|
|
46
46
|
interface UrlWithStringQuery extends Url {
|
|
47
47
|
query: string | null;
|
|
48
48
|
}
|
|
49
|
-
interface FileUrlToPathOptions {
|
|
50
|
-
/**
|
|
51
|
-
* `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default.
|
|
52
|
-
* @default undefined
|
|
53
|
-
*/
|
|
54
|
-
windows?: boolean | undefined;
|
|
55
|
-
}
|
|
56
|
-
interface PathToFileUrlOptions extends FileUrlToPathOptions {}
|
|
57
49
|
/**
|
|
58
50
|
* The `url.parse()` method takes a URL string, parses it, and returns a URL
|
|
59
51
|
* object.
|
|
@@ -306,7 +298,7 @@ declare module "url" {
|
|
|
306
298
|
* @param url The file URL string or URL object to convert to a path.
|
|
307
299
|
* @return The fully-resolved platform-specific Node.js file path.
|
|
308
300
|
*/
|
|
309
|
-
function fileURLToPath(url: string | URL
|
|
301
|
+
function fileURLToPath(url: string | URL): string;
|
|
310
302
|
/**
|
|
311
303
|
* This function ensures that `path` is resolved absolutely, and that the URL
|
|
312
304
|
* control characters are correctly encoded when converting into a File URL.
|
|
@@ -324,7 +316,7 @@ declare module "url" {
|
|
|
324
316
|
* @param path The path to convert to a File URL.
|
|
325
317
|
* @return The file URL object.
|
|
326
318
|
*/
|
|
327
|
-
function pathToFileURL(path: string
|
|
319
|
+
function pathToFileURL(path: string): URL;
|
|
328
320
|
/**
|
|
329
321
|
* This utility function converts a URL object into an ordinary options object as
|
|
330
322
|
* expected by the `http.request()` and `https.request()` APIs.
|
package/package.json
CHANGED
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"jsii-diff": "^1.101.0",
|
|
61
61
|
"jsii-docgen": "^1.8.110",
|
|
62
62
|
"jsii-pacmak": "^1.101.0",
|
|
63
|
-
"jsii-rosetta": "^5.4.
|
|
64
|
-
"projen": "^0.84.
|
|
63
|
+
"jsii-rosetta": "^5.4.28",
|
|
64
|
+
"projen": "^0.84.13",
|
|
65
65
|
"standard-version": "^9",
|
|
66
66
|
"ts-jest": "^27",
|
|
67
67
|
"ts-node": "^10.9.2",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|
|
95
95
|
},
|
|
96
|
-
"version": "3.0.
|
|
96
|
+
"version": "3.0.78",
|
|
97
97
|
"jest": {
|
|
98
98
|
"coverageProvider": "v8",
|
|
99
99
|
"testMatch": [
|