@firestartr/cli 2.4.0-snapshot-7 → 2.5.0-snapshot-1
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/build/{709.index.js → 351.index.js} +3 -3
- package/build/{55.index.js → 540.index.js} +5 -5
- package/build/{318.index.js → 594.index.js} +3 -3
- package/build/{539.index.js → 647.index.js} +5 -5
- package/build/{346.index.js → 857.index.js} +5 -5
- package/build/index.js +101467 -109057
- package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +8 -19
- package/build/packages/gh_provisioner/src/entities/ghmembership/helpers/index.d.ts +2 -0
- package/build/packages/gh_provisioner/src/entities/ghmembership/index.d.ts +1 -0
- package/build/packages/github/index.d.ts +1 -1
- package/build/packages/github/src/repository.d.ts +2 -2
- package/build/packages/importer/src/decanter/gh/github_repo.d.ts +2 -0
- package/build/packages/operator/src/ctl.d.ts +8 -2
- package/build/packages/operator/src/definitions.d.ts +1 -1
- package/build/packages/operator/src/informer.d.ts +2 -2
- package/build/packages/operator/src/tfm_mirrors.d.ts +5 -0
- package/build/packages/terraform_provisioner/index.d.ts +21 -1
- package/build/packages/terraform_provisioner/src/index.d.ts +2 -0
- package/build/packages/terraform_provisioner/src/mirror-repos/index.d.ts +41 -0
- package/build/packages/terraform_provisioner/src/mirror-repos.d.ts +13 -0
- package/build/packages/terraform_provisioner/src/project_tf_remote.d.ts +0 -1
- package/build/packages/terraform_provisioner/src/utils.d.ts +19 -1
- package/package.json +1 -1
- package/build/202.index.js +0 -46
- package/build/697.index.js +0 -80
- package/build/87.index.js +0 -80
- package/build/902.index.js +0 -36
- package/build/915.index.js +0 -79
|
@@ -2899,14 +2899,18 @@ export declare function toJson_TfResultProps(obj: TfResultProps | undefined): Re
|
|
|
2899
2899
|
*/
|
|
2900
2900
|
export interface TfResultSpec {
|
|
2901
2901
|
/**
|
|
2902
|
-
* @schema TfResultSpec#
|
|
2902
|
+
* @schema TfResultSpec#reference
|
|
2903
2903
|
*/
|
|
2904
|
-
readonly
|
|
2904
|
+
readonly reference: TfResultSpecReference;
|
|
2905
2905
|
/**
|
|
2906
|
-
*
|
|
2906
|
+
* DEPRECATED: this field is no longer used and will be removed in a future version.
|
|
2907
|
+
*
|
|
2908
|
+
* @schema TfResultSpec#action
|
|
2907
2909
|
*/
|
|
2908
|
-
readonly
|
|
2910
|
+
readonly action?: string;
|
|
2909
2911
|
/**
|
|
2912
|
+
* Terraform command output or result data.
|
|
2913
|
+
*
|
|
2910
2914
|
* @schema TfResultSpec#result
|
|
2911
2915
|
*/
|
|
2912
2916
|
readonly result?: string;
|
|
@@ -2915,21 +2919,6 @@ export interface TfResultSpec {
|
|
|
2915
2919
|
* Converts an object of type 'TfResultSpec' to JSON representation.
|
|
2916
2920
|
*/
|
|
2917
2921
|
export declare function toJson_TfResultSpec(obj: TfResultSpec | undefined): Record<string, any> | undefined;
|
|
2918
|
-
/**
|
|
2919
|
-
* @schema TfResultSpecAction
|
|
2920
|
-
*/
|
|
2921
|
-
export declare enum TfResultSpecAction {
|
|
2922
|
-
/** init */
|
|
2923
|
-
INIT = "init",
|
|
2924
|
-
/** plan */
|
|
2925
|
-
PLAN = "plan",
|
|
2926
|
-
/** apply */
|
|
2927
|
-
APPLY = "apply",
|
|
2928
|
-
/** destroy */
|
|
2929
|
-
DESTROY = "destroy",
|
|
2930
|
-
/** synth */
|
|
2931
|
-
SYNTH = "synth"
|
|
2932
|
-
}
|
|
2933
2922
|
/**
|
|
2934
2923
|
* @schema TfResultSpecReference
|
|
2935
2924
|
*/
|
|
@@ -32,8 +32,8 @@ declare const _default: {
|
|
|
32
32
|
getOIDCRepo: typeof import("./src/repository").getOIDCRepo;
|
|
33
33
|
addStatusCheck: typeof import("./src/repository").addStatusCheck;
|
|
34
34
|
addCommitStatus: typeof import("./src/repository").addCommitStatus;
|
|
35
|
-
tryCreateRef: typeof import("./src/repository").tryCreateRef;
|
|
36
35
|
getRepoIssuesLabels: typeof import("./src/repository").getRepoIssuesLabels;
|
|
36
|
+
isEmptyRepo: typeof import("./src/repository").isEmptyRepo;
|
|
37
37
|
};
|
|
38
38
|
team: {
|
|
39
39
|
getTeamMembers: typeof import("./src/team").getTeamMembers;
|
|
@@ -1322,12 +1322,12 @@ export declare function uploadFile(destinationPath: string, filePath: string, re
|
|
|
1322
1322
|
export declare function deleteFile(path: string, repo: string, owner?: string, branch?: string, message?: string): Promise<void>;
|
|
1323
1323
|
export declare function addStatusCheck(output: any, is_failure: boolean, head_sha: string, name: string, status: string, repo: string, owner?: string): Promise<void>;
|
|
1324
1324
|
export declare function addCommitStatus(state: commitStatusState, sha: string, repo: string, owner?: string, target_url?: string, description?: string, context?: string): Promise<void>;
|
|
1325
|
-
export declare function tryCreateRef(ref: string, sha: string, repo: string, owner?: string): Promise<boolean>;
|
|
1326
1325
|
export declare function getRepoIssuesLabels(owner: string, repo: string): Promise<{
|
|
1327
1326
|
name: string;
|
|
1328
1327
|
description: string;
|
|
1329
1328
|
color: string;
|
|
1330
1329
|
}[]>;
|
|
1330
|
+
export declare function isEmptyRepo(owner: string, name: string): Promise<boolean>;
|
|
1331
1331
|
declare const _default: {
|
|
1332
1332
|
listReleases: typeof listReleases;
|
|
1333
1333
|
getReleaseByTag: typeof getReleaseByTag;
|
|
@@ -1344,7 +1344,7 @@ declare const _default: {
|
|
|
1344
1344
|
getOIDCRepo: typeof getOIDCRepo;
|
|
1345
1345
|
addStatusCheck: typeof addStatusCheck;
|
|
1346
1346
|
addCommitStatus: typeof addCommitStatus;
|
|
1347
|
-
tryCreateRef: typeof tryCreateRef;
|
|
1348
1347
|
getRepoIssuesLabels: typeof getRepoIssuesLabels;
|
|
1348
|
+
isEmptyRepo: typeof isEmptyRepo;
|
|
1349
1349
|
};
|
|
1350
1350
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BranchStrategiesInitializer, GithubRepositoryOverrider, InitializerDefault } from 'cdk8s_renderer';
|
|
2
2
|
import { GithubDecanter } from './base';
|
|
3
3
|
export default class RepoGithubDecanter extends GithubDecanter {
|
|
4
|
+
__gatherIsEmpty(): Promise<void>;
|
|
5
|
+
__decantValidateNotEmpty(): void;
|
|
4
6
|
githubTeams: any;
|
|
5
7
|
constructor(data: any, org: string, githubTeams?: any);
|
|
6
8
|
claimKind: string;
|
|
@@ -10,7 +10,7 @@ export declare function getConnection(): Promise<{
|
|
|
10
10
|
kc: client.KubeConfig;
|
|
11
11
|
opts: any;
|
|
12
12
|
}>;
|
|
13
|
-
export declare function upsertResult(namespace: string, item: any, result: string): Promise<any>;
|
|
13
|
+
export declare function upsertResult(namespace: string, item: any, result: string, exitCode?: number): Promise<any>;
|
|
14
14
|
export declare function deleteSecret(secretName: string, namespace: string): Promise<any>;
|
|
15
15
|
export declare function upsertSecret(namespace: string, secret: any): Promise<void>;
|
|
16
16
|
export declare function getSecret(namespace: string, secretName: string): Promise<client.V1Secret>;
|
|
@@ -32,7 +32,13 @@ export declare function upsertFinalizer(kind: string, namespace: string, item: a
|
|
|
32
32
|
* @returns {void}
|
|
33
33
|
*/
|
|
34
34
|
export declare function unsetFinalizer(kind: string, namespace: string, item: any | string, finalizer: string): Promise<any>;
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Misspelled export kept for backward compatibility.
|
|
37
|
+
* Use {@link writeTerraformOutputInTFResult} instead.
|
|
38
|
+
*/
|
|
39
|
+
export declare function writeTerraformOuputInTFResult(item: any, output: string, exitCode?: number): Promise<any>;
|
|
40
|
+
/** Correctly-spelled canonical export. Use this instead of the deprecated {@link writeTerraformOuputInTFResult}. */
|
|
41
|
+
export declare const writeTerraformOutputInTFResult: typeof writeTerraformOuputInTFResult;
|
|
36
42
|
export declare function writeConnectionSecret(item: any, outputsConnection: any, finalize?: boolean): Promise<void>;
|
|
37
43
|
export declare function writePlanInGithubPR(prUrl: string, planText: string): Promise<void>;
|
|
38
44
|
export declare function addApplyCommitStatus(cr: any, state: 'error' | 'failure' | 'pending' | 'success', targetURL?: string, description?: string, context?: string): Promise<void>;
|
|
@@ -32,7 +32,7 @@ export type WorkItem = {
|
|
|
32
32
|
};
|
|
33
33
|
type HandlerFinalizerFn = (kind: string, namespace: string, item: any | string, finalizer: string) => Promise<any>;
|
|
34
34
|
type HandlerInformPlanFn = (prUrl: string, planText: string) => Promise<void>;
|
|
35
|
-
type WriteTerraformOutputInTfResultFn = (item: any, output: string) => Promise<any>;
|
|
35
|
+
type WriteTerraformOutputInTfResultFn = (item: any, output: string, exitCode?: number) => Promise<any>;
|
|
36
36
|
type WriteConnectionSecretFn = (item: any, outputsConnection: any, finalize?: boolean) => Promise<void>;
|
|
37
37
|
type ResolveReferencesFn = () => Promise<Dependencies>;
|
|
38
38
|
type DeleteSecretFn = () => Promise<null | undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OperationType, WorkStatus } from './definitions';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WorkItemHandler, WorkItem } from './definitions';
|
|
3
3
|
export { OperationType, WorkStatus };
|
|
4
|
-
export type {
|
|
4
|
+
export type { WorkItemHandler, WorkItem };
|
|
5
5
|
/**
|
|
6
6
|
* Observe whenever a new item is added, modified or deleted in a given kind
|
|
7
7
|
* @param {string} pluralKind - Kind to observe
|
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
export { TFProjectManager } from './src';
|
|
1
|
+
export { TFProjectManager, DEFAULT_MIRROR_WARMUP_LIST, initializeMirrors, } from './src';
|
|
2
2
|
import type { ProcessHandler } from './src/process_handler';
|
|
3
|
+
export interface WarmupMirrorsRefreshOptions {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
runEvery?: number;
|
|
6
|
+
beforeRefresh?: () => Promise<void>;
|
|
7
|
+
onError?: (error: Error) => void | Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export interface WarmupMirrorsResult {
|
|
10
|
+
success: string[];
|
|
11
|
+
failed: {
|
|
12
|
+
repo: string;
|
|
13
|
+
error: string;
|
|
14
|
+
}[];
|
|
15
|
+
initializeRefresher: (runEvery: number, beforeRefresh?: () => Promise<void>, onError?: (error: Error) => void | Promise<void>) => {
|
|
16
|
+
stop: () => void;
|
|
17
|
+
};
|
|
18
|
+
refresher?: {
|
|
19
|
+
stop: () => void;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare function warmupMirrors(repos?: ReadonlyArray<string>, refreshOptions?: WarmupMirrorsRefreshOptions): Promise<WarmupMirrorsResult>;
|
|
3
23
|
export declare function validateContext(context: any): void;
|
|
4
24
|
export declare function run(): Promise<void>;
|
|
5
25
|
export declare function runTerraformProvisioner(context: any, command?: string, streaming?: any, customArgs?: any, ctl?: ProcessHandler): Promise<any>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { TFProjectManager } from './project_tf';
|
|
2
2
|
export { getRefNameFromKey, resolveRef } from './resolutor';
|
|
3
|
+
export { DEFAULT_MIRROR_WARMUP_LIST, resolveMirroredModuleSource, } from './mirror-repos/index';
|
|
4
|
+
export { initializeMirrors } from './mirror-repos';
|
|
3
5
|
export { TFProjectManager };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const MIRROR_ROOT = "/tmp/tfm_mirrors/";
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if the mirror subsystem is enabled for this process
|
|
4
|
+
*/
|
|
5
|
+
export declare function areMirrorsEnabled(): boolean;
|
|
6
|
+
export declare function enableMirrors(): void;
|
|
7
|
+
export declare function getCanonicalRepoId(remoteUrl: string): string;
|
|
8
|
+
export declare function deriveMirrorPath(remoteUrl: string): string;
|
|
9
|
+
export declare function installMirrorForRepo(remoteUrl: string): Promise<string>;
|
|
10
|
+
export declare function translateModuleSource(source: string): string;
|
|
11
|
+
export declare function _getMirrorRegistry(): ReadonlyMap<string, string>;
|
|
12
|
+
export declare function resetMirrorRegistry(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Refresh an existing git mirror by running 'git fetch --prune'.
|
|
15
|
+
* Throws if the mirror is invalid or the fetch fails.
|
|
16
|
+
*/
|
|
17
|
+
export declare function refreshMirror(mirrorPath: string): Promise<void>;
|
|
18
|
+
export { initializeMirrors } from '../mirror-repos';
|
|
19
|
+
/**
|
|
20
|
+
* Default repository list to be warmed up (mirrored) by the warmup API.
|
|
21
|
+
* Callers can supply their own repo list to extend or override this default.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DEFAULT_MIRROR_WARMUP_LIST: ReadonlyArray<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Warmup function: Installs or updates mirrors for a provided repo list (default: DEFAULT_MIRROR_WARMUP_LIST).
|
|
26
|
+
* Returns a summary of success/failure for each repo.
|
|
27
|
+
*/
|
|
28
|
+
export declare function warmupMirrors(repos?: ReadonlyArray<string>): Promise<{
|
|
29
|
+
success: string[];
|
|
30
|
+
failed: {
|
|
31
|
+
repo: string;
|
|
32
|
+
error: string;
|
|
33
|
+
}[];
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Resolves and installs a mirror for a git-backed Terraform root module source.
|
|
37
|
+
* If translation is possible (eligible git::...), returns a local mirror source,
|
|
38
|
+
* else returns the original source string unchanged.
|
|
39
|
+
* Wraps both detection & mirror install. See spec 002-mirror-tfm-usage.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveMirroredModuleSource(source: string): Promise<string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { warmupMirrors, DEFAULT_MIRROR_WARMUP_LIST, refreshMirror, _getMirrorRegistry, getCanonicalRepoId, installMirrorForRepo, deriveMirrorPath, resetMirrorRegistry, MIRROR_ROOT, resolveMirroredModuleSource, translateModuleSource, enableMirrors, areMirrorsEnabled } from './mirror-repos/index';
|
|
2
|
+
export { warmupMirrors, DEFAULT_MIRROR_WARMUP_LIST, refreshMirror, _getMirrorRegistry, getCanonicalRepoId, installMirrorForRepo, deriveMirrorPath, resetMirrorRegistry, MIRROR_ROOT, resolveMirroredModuleSource, translateModuleSource, enableMirrors, areMirrorsEnabled, };
|
|
3
|
+
interface MirrorSummary {
|
|
4
|
+
success: string[];
|
|
5
|
+
failed: {
|
|
6
|
+
repo: string;
|
|
7
|
+
error: string;
|
|
8
|
+
}[];
|
|
9
|
+
initializeRefresher: (runEvery: number, beforeRefresh?: () => Promise<void>, onError?: (error: Error) => void | Promise<void>) => {
|
|
10
|
+
stop: () => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function initializeMirrors(repos?: ReadonlyArray<string>): Promise<MirrorSummary>;
|
|
@@ -24,7 +24,6 @@ export declare class TFProjectManagerRemote {
|
|
|
24
24
|
getOutput(): any;
|
|
25
25
|
setStreamCallbacks(fnData: Function, fnEnd: (...args: any[]) => void, reopen?: boolean): void;
|
|
26
26
|
build(): Promise<void>;
|
|
27
|
-
__configGit(): Promise<void>;
|
|
28
27
|
__init(): Promise<void>;
|
|
29
28
|
__initFromModule(): Promise<void>;
|
|
30
29
|
validate(): Promise<void>;
|
|
@@ -10,4 +10,22 @@ export declare function customCommand(path: string, secrets: any[], args: any[],
|
|
|
10
10
|
export declare function destroy(path: string, secrets: any[], stream?: PassThrough, ctl?: ProcessHandler): Promise<unknown>;
|
|
11
11
|
export declare function output(path: string, secrets: any[]): Promise<unknown>;
|
|
12
12
|
export declare function tfExec(path: string, args: Array<string>, secrets: any[], extraArgs?: string[], stream?: PassThrough, ctl?: ProcessHandler): Promise<unknown>;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Clone a remote repository as a git bare mirror.
|
|
15
|
+
*/
|
|
16
|
+
export declare function gitCloneMirror(remoteUrl: string, mirrorPath: string): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Perform a git remote update on an existing mirror repo.
|
|
19
|
+
*/
|
|
20
|
+
export declare function gitRemoteUpdate(mirrorPath: string): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Run 'git fetch --prune' in a bare or mirror repository.
|
|
23
|
+
* Throws if the operation fails.
|
|
24
|
+
*/
|
|
25
|
+
export declare function gitFetchPrune(mirrorPath: string): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Single package-wide GitHub authentication config writer for repo mirrors and remote workflows.
|
|
28
|
+
* Writes the required url rewriting stanza to /home/node/.gitconfig based on the current org's GitHub App token.
|
|
29
|
+
* This is the ONLY allowed implementation of project git-auth per package specs.
|
|
30
|
+
*/
|
|
31
|
+
export declare function configGit(): Promise<void>;
|
package/package.json
CHANGED
package/build/202.index.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export const id = 202;
|
|
2
|
-
export const ids = [202];
|
|
3
|
-
export const modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 66202:
|
|
6
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10
|
-
exports.getMachineId = void 0;
|
|
11
|
-
/*
|
|
12
|
-
* Copyright The OpenTelemetry Authors
|
|
13
|
-
*
|
|
14
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15
|
-
* you may not use this file except in compliance with the License.
|
|
16
|
-
* You may obtain a copy of the License at
|
|
17
|
-
*
|
|
18
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
-
*
|
|
20
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
21
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
22
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23
|
-
* See the License for the specific language governing permissions and
|
|
24
|
-
* limitations under the License.
|
|
25
|
-
*/
|
|
26
|
-
const fs_1 = __webpack_require__(57147);
|
|
27
|
-
const api_1 = __webpack_require__(78199);
|
|
28
|
-
async function getMachineId() {
|
|
29
|
-
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
|
|
30
|
-
for (const path of paths) {
|
|
31
|
-
try {
|
|
32
|
-
const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });
|
|
33
|
-
return result.trim();
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
exports.getMachineId = getMachineId;
|
|
42
|
-
//# sourceMappingURL=getMachineId-linux.js.map
|
|
43
|
-
|
|
44
|
-
/***/ })
|
|
45
|
-
|
|
46
|
-
};
|
package/build/697.index.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export const id = 697;
|
|
2
|
-
export const ids = [697];
|
|
3
|
-
export const modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 69192:
|
|
6
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* Copyright The OpenTelemetry Authors
|
|
11
|
-
*
|
|
12
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this file except in compliance with the License.
|
|
14
|
-
* You may obtain a copy of the License at
|
|
15
|
-
*
|
|
16
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
*
|
|
18
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
-
* See the License for the specific language governing permissions and
|
|
22
|
-
* limitations under the License.
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25
|
-
exports.execAsync = void 0;
|
|
26
|
-
const child_process = __webpack_require__(32081);
|
|
27
|
-
const util = __webpack_require__(73837);
|
|
28
|
-
exports.execAsync = util.promisify(child_process.exec);
|
|
29
|
-
//# sourceMappingURL=execAsync.js.map
|
|
30
|
-
|
|
31
|
-
/***/ }),
|
|
32
|
-
|
|
33
|
-
/***/ 30697:
|
|
34
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/*
|
|
38
|
-
* Copyright The OpenTelemetry Authors
|
|
39
|
-
*
|
|
40
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
41
|
-
* you may not use this file except in compliance with the License.
|
|
42
|
-
* You may obtain a copy of the License at
|
|
43
|
-
*
|
|
44
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45
|
-
*
|
|
46
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
47
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
48
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
49
|
-
* See the License for the specific language governing permissions and
|
|
50
|
-
* limitations under the License.
|
|
51
|
-
*/
|
|
52
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
53
|
-
exports.getMachineId = void 0;
|
|
54
|
-
const execAsync_1 = __webpack_require__(69192);
|
|
55
|
-
const api_1 = __webpack_require__(78199);
|
|
56
|
-
async function getMachineId() {
|
|
57
|
-
try {
|
|
58
|
-
const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"');
|
|
59
|
-
const idLine = result.stdout
|
|
60
|
-
.split('\n')
|
|
61
|
-
.find(line => line.includes('IOPlatformUUID'));
|
|
62
|
-
if (!idLine) {
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
const parts = idLine.split('" = "');
|
|
66
|
-
if (parts.length === 2) {
|
|
67
|
-
return parts[1].slice(0, -1);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch (e) {
|
|
71
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
72
|
-
}
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
exports.getMachineId = getMachineId;
|
|
76
|
-
//# sourceMappingURL=getMachineId-darwin.js.map
|
|
77
|
-
|
|
78
|
-
/***/ })
|
|
79
|
-
|
|
80
|
-
};
|
package/build/87.index.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export const id = 87;
|
|
2
|
-
export const ids = [87];
|
|
3
|
-
export const modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 69192:
|
|
6
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* Copyright The OpenTelemetry Authors
|
|
11
|
-
*
|
|
12
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this file except in compliance with the License.
|
|
14
|
-
* You may obtain a copy of the License at
|
|
15
|
-
*
|
|
16
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
*
|
|
18
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
-
* See the License for the specific language governing permissions and
|
|
22
|
-
* limitations under the License.
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25
|
-
exports.execAsync = void 0;
|
|
26
|
-
const child_process = __webpack_require__(32081);
|
|
27
|
-
const util = __webpack_require__(73837);
|
|
28
|
-
exports.execAsync = util.promisify(child_process.exec);
|
|
29
|
-
//# sourceMappingURL=execAsync.js.map
|
|
30
|
-
|
|
31
|
-
/***/ }),
|
|
32
|
-
|
|
33
|
-
/***/ 55087:
|
|
34
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/*
|
|
38
|
-
* Copyright The OpenTelemetry Authors
|
|
39
|
-
*
|
|
40
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
41
|
-
* you may not use this file except in compliance with the License.
|
|
42
|
-
* You may obtain a copy of the License at
|
|
43
|
-
*
|
|
44
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45
|
-
*
|
|
46
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
47
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
48
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
49
|
-
* See the License for the specific language governing permissions and
|
|
50
|
-
* limitations under the License.
|
|
51
|
-
*/
|
|
52
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
53
|
-
exports.getMachineId = void 0;
|
|
54
|
-
const process = __webpack_require__(77282);
|
|
55
|
-
const execAsync_1 = __webpack_require__(69192);
|
|
56
|
-
const api_1 = __webpack_require__(78199);
|
|
57
|
-
async function getMachineId() {
|
|
58
|
-
const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
|
|
59
|
-
let command = '%windir%\\System32\\REG.exe';
|
|
60
|
-
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
|
|
61
|
-
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
|
|
62
|
-
}
|
|
63
|
-
try {
|
|
64
|
-
const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
|
|
65
|
-
const parts = result.stdout.split('REG_SZ');
|
|
66
|
-
if (parts.length === 2) {
|
|
67
|
-
return parts[1].trim();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch (e) {
|
|
71
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
72
|
-
}
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
exports.getMachineId = getMachineId;
|
|
76
|
-
//# sourceMappingURL=getMachineId-win.js.map
|
|
77
|
-
|
|
78
|
-
/***/ })
|
|
79
|
-
|
|
80
|
-
};
|
package/build/902.index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export const id = 902;
|
|
2
|
-
export const ids = [902];
|
|
3
|
-
export const modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 31902:
|
|
6
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* Copyright The OpenTelemetry Authors
|
|
11
|
-
*
|
|
12
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this file except in compliance with the License.
|
|
14
|
-
* You may obtain a copy of the License at
|
|
15
|
-
*
|
|
16
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
*
|
|
18
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
-
* See the License for the specific language governing permissions and
|
|
22
|
-
* limitations under the License.
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25
|
-
exports.getMachineId = void 0;
|
|
26
|
-
const api_1 = __webpack_require__(78199);
|
|
27
|
-
async function getMachineId() {
|
|
28
|
-
api_1.diag.debug('could not read machine-id: unsupported platform');
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
exports.getMachineId = getMachineId;
|
|
32
|
-
//# sourceMappingURL=getMachineId-unsupported.js.map
|
|
33
|
-
|
|
34
|
-
/***/ })
|
|
35
|
-
|
|
36
|
-
};
|
package/build/915.index.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export const id = 915;
|
|
2
|
-
export const ids = [915];
|
|
3
|
-
export const modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 69192:
|
|
6
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* Copyright The OpenTelemetry Authors
|
|
11
|
-
*
|
|
12
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this file except in compliance with the License.
|
|
14
|
-
* You may obtain a copy of the License at
|
|
15
|
-
*
|
|
16
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
*
|
|
18
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
-
* See the License for the specific language governing permissions and
|
|
22
|
-
* limitations under the License.
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25
|
-
exports.execAsync = void 0;
|
|
26
|
-
const child_process = __webpack_require__(32081);
|
|
27
|
-
const util = __webpack_require__(73837);
|
|
28
|
-
exports.execAsync = util.promisify(child_process.exec);
|
|
29
|
-
//# sourceMappingURL=execAsync.js.map
|
|
30
|
-
|
|
31
|
-
/***/ }),
|
|
32
|
-
|
|
33
|
-
/***/ 36915:
|
|
34
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/*
|
|
38
|
-
* Copyright The OpenTelemetry Authors
|
|
39
|
-
*
|
|
40
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
41
|
-
* you may not use this file except in compliance with the License.
|
|
42
|
-
* You may obtain a copy of the License at
|
|
43
|
-
*
|
|
44
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45
|
-
*
|
|
46
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
47
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
48
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
49
|
-
* See the License for the specific language governing permissions and
|
|
50
|
-
* limitations under the License.
|
|
51
|
-
*/
|
|
52
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
53
|
-
exports.getMachineId = void 0;
|
|
54
|
-
const fs_1 = __webpack_require__(57147);
|
|
55
|
-
const execAsync_1 = __webpack_require__(69192);
|
|
56
|
-
const api_1 = __webpack_require__(78199);
|
|
57
|
-
async function getMachineId() {
|
|
58
|
-
try {
|
|
59
|
-
const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });
|
|
60
|
-
return result.trim();
|
|
61
|
-
}
|
|
62
|
-
catch (e) {
|
|
63
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
64
|
-
}
|
|
65
|
-
try {
|
|
66
|
-
const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');
|
|
67
|
-
return result.stdout.trim();
|
|
68
|
-
}
|
|
69
|
-
catch (e) {
|
|
70
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
71
|
-
}
|
|
72
|
-
return undefined;
|
|
73
|
-
}
|
|
74
|
-
exports.getMachineId = getMachineId;
|
|
75
|
-
//# sourceMappingURL=getMachineId-bsd.js.map
|
|
76
|
-
|
|
77
|
-
/***/ })
|
|
78
|
-
|
|
79
|
-
};
|