This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

1
node_modules/@pnpm/network.ca-file/dist/ca-file.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function readCAFileSync(filePath: string): string[] | undefined;

View File

@@ -0,0 +1,12 @@
---
labels: ['ca', 'certificate authority']
description: 'A component for reading the certificate authority data from a text file'
---
API:
```ts
import { readCAFileSync } from '@pnpm/network.ca-file'
readCAFileSync('cafile.txt')
```

25
node_modules/@pnpm/network.ca-file/dist/ca-file.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.readCAFileSync = void 0;
const graceful_fs_1 = __importDefault(require("graceful-fs"));
function readCAFileSync(filePath) {
try {
const contents = graceful_fs_1.default.readFileSync(filePath, 'utf8');
const delim = '-----END CERTIFICATE-----';
const output = contents
.split(delim)
.filter((ca) => Boolean(ca.trim()))
.map((ca) => `${ca.trimLeft()}${delim}`);
return output;
}
catch (err) {
if (err.code === 'ENOENT')
return undefined;
throw err;
}
}
exports.readCAFileSync = readCAFileSync;
//# sourceMappingURL=ca-file.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ca-file.js","sourceRoot":"","sources":["../ca-file.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA4B;AAE5B,SAAgB,cAAc,CAAE,QAAgB;IAC9C,IAAI;QACF,MAAM,QAAQ,GAAG,qBAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;QAClD,MAAM,KAAK,GAAG,2BAA2B,CAAA;QACzC,MAAM,MAAM,GAAG,QAAQ;aACpB,KAAK,CAAC,KAAK,CAAC;aACZ,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;aAClC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC,CAAA;QAC1C,OAAO,MAAM,CAAA;KACd;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAA;QAC3C,MAAM,GAAG,CAAA;KACV;AACH,CAAC;AAbD,wCAaC"}

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,24 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
const ca_file_1 = require("./ca-file");
it('should read CA file', () => {
expect((0, ca_file_1.readCAFileSync)(path_1.default.join(__dirname, 'fixtures/ca-file1.txt'))).toStrictEqual([
`-----BEGIN CERTIFICATE-----
XXXX
-----END CERTIFICATE-----`,
`-----BEGIN CERTIFICATE-----
YYYY
-----END CERTIFICATE-----`,
`-----BEGIN CERTIFICATE-----
ZZZZ
-----END CERTIFICATE-----`,
]);
});
it('should not fail when the file does not exist', () => {
expect((0, ca_file_1.readCAFileSync)(path_1.default.join(__dirname, 'not-exists.txt'))).toEqual(undefined);
});
//# sourceMappingURL=ca-file.spec.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ca-file.spec.js","sourceRoot":"","sources":["../ca-file.spec.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,uCAA2C;AAE3C,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAC7B,MAAM,CAAC,IAAA,wBAAc,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;QAClF;;0BAEsB;QACtB;;0BAEsB;QACtB;;0BAEsB;KACvB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;IACtD,MAAM,CAAC,IAAA,wBAAc,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;AACnF,CAAC,CAAC,CAAA"}

View File

@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
XXXX
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
YYYY
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
ZZZZ
-----END CERTIFICATE-----

1
node_modules/@pnpm/network.ca-file/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from './ca-file';

18
node_modules/@pnpm/network.ca-file/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./ca-file"), exports);
//# sourceMappingURL=index.js.map

1
node_modules/@pnpm/network.ca-file/dist/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}

32
node_modules/@pnpm/network.ca-file/dist/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,32 @@
{
"compilerOptions": {
"lib": [
"es2019",
"DOM",
"ES6",
"DOM.Iterable"
],
"target": "es2015",
"module": "CommonJS",
"jsx": "react",
"allowJs": true,
"composite": true,
"declaration": true,
"sourceMap": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"outDir": "dist",
"moduleResolution": "node",
"esModuleInterop": true,
"rootDir": ".",
"resolveJsonModule": true
},
"exclude": [
"dist",
"package.json"
],
"include": [
"**/*",
"**/*.json"
]
}