@attest-it/core 0.8.0 → 0.9.0
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/dist/core-alpha.d.ts +29 -13
- package/dist/core-beta.d.ts +29 -13
- package/dist/core-public.d.ts +29 -13
- package/dist/core-unstripped.d.ts +29 -13
- package/dist/index.cjs +9 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -13
- package/dist/index.d.ts +29 -13
- package/dist/index.js +9 -18
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/core-alpha.d.ts
CHANGED
|
@@ -395,16 +395,19 @@ declare const configSchema: z.ZodObject<{
|
|
|
395
395
|
github: z.ZodOptional<z.ZodString>;
|
|
396
396
|
name: z.ZodString;
|
|
397
397
|
publicKey: z.ZodString;
|
|
398
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodEnum<["ed25519"]>>;
|
|
398
399
|
}, "strict", z.ZodTypeAny, {
|
|
399
400
|
email?: string | undefined;
|
|
400
401
|
github?: string | undefined;
|
|
401
402
|
name: string;
|
|
402
403
|
publicKey: string;
|
|
404
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
403
405
|
}, {
|
|
404
406
|
email?: string | undefined;
|
|
405
407
|
github?: string | undefined;
|
|
406
408
|
name: string;
|
|
407
409
|
publicKey: string;
|
|
410
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
408
411
|
}>>>;
|
|
409
412
|
version: z.ZodLiteral<1>;
|
|
410
413
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -452,6 +455,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
452
455
|
github?: string | undefined;
|
|
453
456
|
name: string;
|
|
454
457
|
publicKey: string;
|
|
458
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
455
459
|
}> | undefined;
|
|
456
460
|
version: 1;
|
|
457
461
|
}, {
|
|
@@ -525,6 +529,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
525
529
|
github?: string | undefined;
|
|
526
530
|
name: string;
|
|
527
531
|
publicKey: string;
|
|
532
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
528
533
|
}> | undefined;
|
|
529
534
|
version: 1;
|
|
530
535
|
}>;
|
|
@@ -885,9 +890,8 @@ export declare function getPreferencesPath(): string;
|
|
|
885
890
|
/**
|
|
886
891
|
* Get the project public keys directory.
|
|
887
892
|
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
890
|
-
* verify attestation seals.
|
|
893
|
+
* @deprecated Public keys are now stored inline in the team section of config.yaml.
|
|
894
|
+
* This function is kept for backward compatibility but should not be used in new code.
|
|
891
895
|
*
|
|
892
896
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
893
897
|
* @returns Path to the project public keys directory
|
|
@@ -908,6 +912,9 @@ export declare function getPublicKeyFromPrivate(privateKeyPem: string): string;
|
|
|
908
912
|
/**
|
|
909
913
|
* Check if a project has attest-it configuration.
|
|
910
914
|
*
|
|
915
|
+
* @deprecated This function is kept for backward compatibility but is no longer used
|
|
916
|
+
* by the core library. Public keys are now stored inline in config.yaml.
|
|
917
|
+
*
|
|
911
918
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
912
919
|
* @returns True if the project has .attest-it/config.yaml or similar
|
|
913
920
|
* @public
|
|
@@ -1738,16 +1745,19 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1738
1745
|
github: z.ZodOptional<z.ZodString>;
|
|
1739
1746
|
name: z.ZodString;
|
|
1740
1747
|
publicKey: z.ZodString;
|
|
1748
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodLiteral<"ed25519">>;
|
|
1741
1749
|
}, "strict", z.ZodTypeAny, {
|
|
1742
1750
|
email?: string | undefined;
|
|
1743
1751
|
github?: string | undefined;
|
|
1744
1752
|
name: string;
|
|
1745
1753
|
publicKey: string;
|
|
1754
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1746
1755
|
}, {
|
|
1747
1756
|
email?: string | undefined;
|
|
1748
1757
|
github?: string | undefined;
|
|
1749
1758
|
name: string;
|
|
1750
1759
|
publicKey: string;
|
|
1760
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1751
1761
|
}>>>;
|
|
1752
1762
|
version: z.ZodLiteral<1>;
|
|
1753
1763
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1772,6 +1782,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1772
1782
|
github?: string | undefined;
|
|
1773
1783
|
name: string;
|
|
1774
1784
|
publicKey: string;
|
|
1785
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1775
1786
|
}> | undefined;
|
|
1776
1787
|
version: 1;
|
|
1777
1788
|
}, {
|
|
@@ -1796,6 +1807,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1796
1807
|
github?: string | undefined;
|
|
1797
1808
|
name: string;
|
|
1798
1809
|
publicKey: string;
|
|
1810
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1799
1811
|
}> | undefined;
|
|
1800
1812
|
version: 1;
|
|
1801
1813
|
}>;
|
|
@@ -1956,16 +1968,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1956
1968
|
export declare function savePreferences(preferences: UserPreferences): Promise<void>;
|
|
1957
1969
|
|
|
1958
1970
|
/**
|
|
1959
|
-
* Save a public key to the user's home directory
|
|
1971
|
+
* Save a public key to the user's home directory.
|
|
1960
1972
|
*
|
|
1961
1973
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1962
|
-
* to
|
|
1963
|
-
*
|
|
1964
|
-
*
|
|
1974
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
1975
|
+
*
|
|
1976
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
1977
|
+
* written to the project directory.
|
|
1965
1978
|
*
|
|
1966
1979
|
* @param slug - The identity slug (used for the filename)
|
|
1967
1980
|
* @param publicKey - The base64-encoded public key
|
|
1968
|
-
* @param projectRoot - The project root directory (
|
|
1981
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1969
1982
|
* @returns Paths where the key was saved
|
|
1970
1983
|
* @public
|
|
1971
1984
|
*/
|
|
@@ -1983,16 +1996,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1983
1996
|
}
|
|
1984
1997
|
|
|
1985
1998
|
/**
|
|
1986
|
-
* Save a public key to the user's home directory
|
|
1999
|
+
* Save a public key to the user's home directory (sync).
|
|
1987
2000
|
*
|
|
1988
2001
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1989
|
-
* to
|
|
1990
|
-
*
|
|
1991
|
-
*
|
|
2002
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
2003
|
+
*
|
|
2004
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
2005
|
+
* written to the project directory.
|
|
1992
2006
|
*
|
|
1993
2007
|
* @param slug - The identity slug (used for the filename)
|
|
1994
2008
|
* @param publicKey - The base64-encoded public key
|
|
1995
|
-
* @param projectRoot - The project root directory (
|
|
2009
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1996
2010
|
* @returns Paths where the key was saved
|
|
1997
2011
|
* @public
|
|
1998
2012
|
*/
|
|
@@ -2193,6 +2207,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
2193
2207
|
github?: string | undefined;
|
|
2194
2208
|
/** Base64-encoded Ed25519 public key */
|
|
2195
2209
|
publicKey: string;
|
|
2210
|
+
/** Public key algorithm (optional, for future-proofing format changes) */
|
|
2211
|
+
publicKeyAlgorithm?: 'ed25519' | undefined;
|
|
2196
2212
|
}
|
|
2197
2213
|
|
|
2198
2214
|
/**
|
package/dist/core-beta.d.ts
CHANGED
|
@@ -395,16 +395,19 @@ declare const configSchema: z.ZodObject<{
|
|
|
395
395
|
github: z.ZodOptional<z.ZodString>;
|
|
396
396
|
name: z.ZodString;
|
|
397
397
|
publicKey: z.ZodString;
|
|
398
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodEnum<["ed25519"]>>;
|
|
398
399
|
}, "strict", z.ZodTypeAny, {
|
|
399
400
|
email?: string | undefined;
|
|
400
401
|
github?: string | undefined;
|
|
401
402
|
name: string;
|
|
402
403
|
publicKey: string;
|
|
404
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
403
405
|
}, {
|
|
404
406
|
email?: string | undefined;
|
|
405
407
|
github?: string | undefined;
|
|
406
408
|
name: string;
|
|
407
409
|
publicKey: string;
|
|
410
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
408
411
|
}>>>;
|
|
409
412
|
version: z.ZodLiteral<1>;
|
|
410
413
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -452,6 +455,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
452
455
|
github?: string | undefined;
|
|
453
456
|
name: string;
|
|
454
457
|
publicKey: string;
|
|
458
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
455
459
|
}> | undefined;
|
|
456
460
|
version: 1;
|
|
457
461
|
}, {
|
|
@@ -525,6 +529,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
525
529
|
github?: string | undefined;
|
|
526
530
|
name: string;
|
|
527
531
|
publicKey: string;
|
|
532
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
528
533
|
}> | undefined;
|
|
529
534
|
version: 1;
|
|
530
535
|
}>;
|
|
@@ -885,9 +890,8 @@ export declare function getPreferencesPath(): string;
|
|
|
885
890
|
/**
|
|
886
891
|
* Get the project public keys directory.
|
|
887
892
|
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
890
|
-
* verify attestation seals.
|
|
893
|
+
* @deprecated Public keys are now stored inline in the team section of config.yaml.
|
|
894
|
+
* This function is kept for backward compatibility but should not be used in new code.
|
|
891
895
|
*
|
|
892
896
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
893
897
|
* @returns Path to the project public keys directory
|
|
@@ -908,6 +912,9 @@ export declare function getPublicKeyFromPrivate(privateKeyPem: string): string;
|
|
|
908
912
|
/**
|
|
909
913
|
* Check if a project has attest-it configuration.
|
|
910
914
|
*
|
|
915
|
+
* @deprecated This function is kept for backward compatibility but is no longer used
|
|
916
|
+
* by the core library. Public keys are now stored inline in config.yaml.
|
|
917
|
+
*
|
|
911
918
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
912
919
|
* @returns True if the project has .attest-it/config.yaml or similar
|
|
913
920
|
* @public
|
|
@@ -1738,16 +1745,19 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1738
1745
|
github: z.ZodOptional<z.ZodString>;
|
|
1739
1746
|
name: z.ZodString;
|
|
1740
1747
|
publicKey: z.ZodString;
|
|
1748
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodLiteral<"ed25519">>;
|
|
1741
1749
|
}, "strict", z.ZodTypeAny, {
|
|
1742
1750
|
email?: string | undefined;
|
|
1743
1751
|
github?: string | undefined;
|
|
1744
1752
|
name: string;
|
|
1745
1753
|
publicKey: string;
|
|
1754
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1746
1755
|
}, {
|
|
1747
1756
|
email?: string | undefined;
|
|
1748
1757
|
github?: string | undefined;
|
|
1749
1758
|
name: string;
|
|
1750
1759
|
publicKey: string;
|
|
1760
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1751
1761
|
}>>>;
|
|
1752
1762
|
version: z.ZodLiteral<1>;
|
|
1753
1763
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1772,6 +1782,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1772
1782
|
github?: string | undefined;
|
|
1773
1783
|
name: string;
|
|
1774
1784
|
publicKey: string;
|
|
1785
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1775
1786
|
}> | undefined;
|
|
1776
1787
|
version: 1;
|
|
1777
1788
|
}, {
|
|
@@ -1796,6 +1807,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1796
1807
|
github?: string | undefined;
|
|
1797
1808
|
name: string;
|
|
1798
1809
|
publicKey: string;
|
|
1810
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1799
1811
|
}> | undefined;
|
|
1800
1812
|
version: 1;
|
|
1801
1813
|
}>;
|
|
@@ -1956,16 +1968,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1956
1968
|
export declare function savePreferences(preferences: UserPreferences): Promise<void>;
|
|
1957
1969
|
|
|
1958
1970
|
/**
|
|
1959
|
-
* Save a public key to the user's home directory
|
|
1971
|
+
* Save a public key to the user's home directory.
|
|
1960
1972
|
*
|
|
1961
1973
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1962
|
-
* to
|
|
1963
|
-
*
|
|
1964
|
-
*
|
|
1974
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
1975
|
+
*
|
|
1976
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
1977
|
+
* written to the project directory.
|
|
1965
1978
|
*
|
|
1966
1979
|
* @param slug - The identity slug (used for the filename)
|
|
1967
1980
|
* @param publicKey - The base64-encoded public key
|
|
1968
|
-
* @param projectRoot - The project root directory (
|
|
1981
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1969
1982
|
* @returns Paths where the key was saved
|
|
1970
1983
|
* @public
|
|
1971
1984
|
*/
|
|
@@ -1983,16 +1996,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1983
1996
|
}
|
|
1984
1997
|
|
|
1985
1998
|
/**
|
|
1986
|
-
* Save a public key to the user's home directory
|
|
1999
|
+
* Save a public key to the user's home directory (sync).
|
|
1987
2000
|
*
|
|
1988
2001
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1989
|
-
* to
|
|
1990
|
-
*
|
|
1991
|
-
*
|
|
2002
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
2003
|
+
*
|
|
2004
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
2005
|
+
* written to the project directory.
|
|
1992
2006
|
*
|
|
1993
2007
|
* @param slug - The identity slug (used for the filename)
|
|
1994
2008
|
* @param publicKey - The base64-encoded public key
|
|
1995
|
-
* @param projectRoot - The project root directory (
|
|
2009
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1996
2010
|
* @returns Paths where the key was saved
|
|
1997
2011
|
* @public
|
|
1998
2012
|
*/
|
|
@@ -2193,6 +2207,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
2193
2207
|
github?: string | undefined;
|
|
2194
2208
|
/** Base64-encoded Ed25519 public key */
|
|
2195
2209
|
publicKey: string;
|
|
2210
|
+
/** Public key algorithm (optional, for future-proofing format changes) */
|
|
2211
|
+
publicKeyAlgorithm?: 'ed25519' | undefined;
|
|
2196
2212
|
}
|
|
2197
2213
|
|
|
2198
2214
|
/**
|
package/dist/core-public.d.ts
CHANGED
|
@@ -395,16 +395,19 @@ declare const configSchema: z.ZodObject<{
|
|
|
395
395
|
github: z.ZodOptional<z.ZodString>;
|
|
396
396
|
name: z.ZodString;
|
|
397
397
|
publicKey: z.ZodString;
|
|
398
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodEnum<["ed25519"]>>;
|
|
398
399
|
}, "strict", z.ZodTypeAny, {
|
|
399
400
|
email?: string | undefined;
|
|
400
401
|
github?: string | undefined;
|
|
401
402
|
name: string;
|
|
402
403
|
publicKey: string;
|
|
404
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
403
405
|
}, {
|
|
404
406
|
email?: string | undefined;
|
|
405
407
|
github?: string | undefined;
|
|
406
408
|
name: string;
|
|
407
409
|
publicKey: string;
|
|
410
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
408
411
|
}>>>;
|
|
409
412
|
version: z.ZodLiteral<1>;
|
|
410
413
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -452,6 +455,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
452
455
|
github?: string | undefined;
|
|
453
456
|
name: string;
|
|
454
457
|
publicKey: string;
|
|
458
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
455
459
|
}> | undefined;
|
|
456
460
|
version: 1;
|
|
457
461
|
}, {
|
|
@@ -525,6 +529,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
525
529
|
github?: string | undefined;
|
|
526
530
|
name: string;
|
|
527
531
|
publicKey: string;
|
|
532
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
528
533
|
}> | undefined;
|
|
529
534
|
version: 1;
|
|
530
535
|
}>;
|
|
@@ -885,9 +890,8 @@ export declare function getPreferencesPath(): string;
|
|
|
885
890
|
/**
|
|
886
891
|
* Get the project public keys directory.
|
|
887
892
|
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
890
|
-
* verify attestation seals.
|
|
893
|
+
* @deprecated Public keys are now stored inline in the team section of config.yaml.
|
|
894
|
+
* This function is kept for backward compatibility but should not be used in new code.
|
|
891
895
|
*
|
|
892
896
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
893
897
|
* @returns Path to the project public keys directory
|
|
@@ -908,6 +912,9 @@ export declare function getPublicKeyFromPrivate(privateKeyPem: string): string;
|
|
|
908
912
|
/**
|
|
909
913
|
* Check if a project has attest-it configuration.
|
|
910
914
|
*
|
|
915
|
+
* @deprecated This function is kept for backward compatibility but is no longer used
|
|
916
|
+
* by the core library. Public keys are now stored inline in config.yaml.
|
|
917
|
+
*
|
|
911
918
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
912
919
|
* @returns True if the project has .attest-it/config.yaml or similar
|
|
913
920
|
* @public
|
|
@@ -1738,16 +1745,19 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1738
1745
|
github: z.ZodOptional<z.ZodString>;
|
|
1739
1746
|
name: z.ZodString;
|
|
1740
1747
|
publicKey: z.ZodString;
|
|
1748
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodLiteral<"ed25519">>;
|
|
1741
1749
|
}, "strict", z.ZodTypeAny, {
|
|
1742
1750
|
email?: string | undefined;
|
|
1743
1751
|
github?: string | undefined;
|
|
1744
1752
|
name: string;
|
|
1745
1753
|
publicKey: string;
|
|
1754
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1746
1755
|
}, {
|
|
1747
1756
|
email?: string | undefined;
|
|
1748
1757
|
github?: string | undefined;
|
|
1749
1758
|
name: string;
|
|
1750
1759
|
publicKey: string;
|
|
1760
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1751
1761
|
}>>>;
|
|
1752
1762
|
version: z.ZodLiteral<1>;
|
|
1753
1763
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1772,6 +1782,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1772
1782
|
github?: string | undefined;
|
|
1773
1783
|
name: string;
|
|
1774
1784
|
publicKey: string;
|
|
1785
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1775
1786
|
}> | undefined;
|
|
1776
1787
|
version: 1;
|
|
1777
1788
|
}, {
|
|
@@ -1796,6 +1807,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1796
1807
|
github?: string | undefined;
|
|
1797
1808
|
name: string;
|
|
1798
1809
|
publicKey: string;
|
|
1810
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1799
1811
|
}> | undefined;
|
|
1800
1812
|
version: 1;
|
|
1801
1813
|
}>;
|
|
@@ -1956,16 +1968,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1956
1968
|
export declare function savePreferences(preferences: UserPreferences): Promise<void>;
|
|
1957
1969
|
|
|
1958
1970
|
/**
|
|
1959
|
-
* Save a public key to the user's home directory
|
|
1971
|
+
* Save a public key to the user's home directory.
|
|
1960
1972
|
*
|
|
1961
1973
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1962
|
-
* to
|
|
1963
|
-
*
|
|
1964
|
-
*
|
|
1974
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
1975
|
+
*
|
|
1976
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
1977
|
+
* written to the project directory.
|
|
1965
1978
|
*
|
|
1966
1979
|
* @param slug - The identity slug (used for the filename)
|
|
1967
1980
|
* @param publicKey - The base64-encoded public key
|
|
1968
|
-
* @param projectRoot - The project root directory (
|
|
1981
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1969
1982
|
* @returns Paths where the key was saved
|
|
1970
1983
|
* @public
|
|
1971
1984
|
*/
|
|
@@ -1983,16 +1996,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1983
1996
|
}
|
|
1984
1997
|
|
|
1985
1998
|
/**
|
|
1986
|
-
* Save a public key to the user's home directory
|
|
1999
|
+
* Save a public key to the user's home directory (sync).
|
|
1987
2000
|
*
|
|
1988
2001
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1989
|
-
* to
|
|
1990
|
-
*
|
|
1991
|
-
*
|
|
2002
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
2003
|
+
*
|
|
2004
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
2005
|
+
* written to the project directory.
|
|
1992
2006
|
*
|
|
1993
2007
|
* @param slug - The identity slug (used for the filename)
|
|
1994
2008
|
* @param publicKey - The base64-encoded public key
|
|
1995
|
-
* @param projectRoot - The project root directory (
|
|
2009
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1996
2010
|
* @returns Paths where the key was saved
|
|
1997
2011
|
* @public
|
|
1998
2012
|
*/
|
|
@@ -2193,6 +2207,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
2193
2207
|
github?: string | undefined;
|
|
2194
2208
|
/** Base64-encoded Ed25519 public key */
|
|
2195
2209
|
publicKey: string;
|
|
2210
|
+
/** Public key algorithm (optional, for future-proofing format changes) */
|
|
2211
|
+
publicKeyAlgorithm?: 'ed25519' | undefined;
|
|
2196
2212
|
}
|
|
2197
2213
|
|
|
2198
2214
|
/**
|
|
@@ -395,16 +395,19 @@ declare const configSchema: z.ZodObject<{
|
|
|
395
395
|
github: z.ZodOptional<z.ZodString>;
|
|
396
396
|
name: z.ZodString;
|
|
397
397
|
publicKey: z.ZodString;
|
|
398
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodEnum<["ed25519"]>>;
|
|
398
399
|
}, "strict", z.ZodTypeAny, {
|
|
399
400
|
email?: string | undefined;
|
|
400
401
|
github?: string | undefined;
|
|
401
402
|
name: string;
|
|
402
403
|
publicKey: string;
|
|
404
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
403
405
|
}, {
|
|
404
406
|
email?: string | undefined;
|
|
405
407
|
github?: string | undefined;
|
|
406
408
|
name: string;
|
|
407
409
|
publicKey: string;
|
|
410
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
408
411
|
}>>>;
|
|
409
412
|
version: z.ZodLiteral<1>;
|
|
410
413
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -452,6 +455,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
452
455
|
github?: string | undefined;
|
|
453
456
|
name: string;
|
|
454
457
|
publicKey: string;
|
|
458
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
455
459
|
}> | undefined;
|
|
456
460
|
version: 1;
|
|
457
461
|
}, {
|
|
@@ -525,6 +529,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
525
529
|
github?: string | undefined;
|
|
526
530
|
name: string;
|
|
527
531
|
publicKey: string;
|
|
532
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
528
533
|
}> | undefined;
|
|
529
534
|
version: 1;
|
|
530
535
|
}>;
|
|
@@ -885,9 +890,8 @@ export declare function getPreferencesPath(): string;
|
|
|
885
890
|
/**
|
|
886
891
|
* Get the project public keys directory.
|
|
887
892
|
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
890
|
-
* verify attestation seals.
|
|
893
|
+
* @deprecated Public keys are now stored inline in the team section of config.yaml.
|
|
894
|
+
* This function is kept for backward compatibility but should not be used in new code.
|
|
891
895
|
*
|
|
892
896
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
893
897
|
* @returns Path to the project public keys directory
|
|
@@ -908,6 +912,9 @@ export declare function getPublicKeyFromPrivate(privateKeyPem: string): string;
|
|
|
908
912
|
/**
|
|
909
913
|
* Check if a project has attest-it configuration.
|
|
910
914
|
*
|
|
915
|
+
* @deprecated This function is kept for backward compatibility but is no longer used
|
|
916
|
+
* by the core library. Public keys are now stored inline in config.yaml.
|
|
917
|
+
*
|
|
911
918
|
* @param projectRoot - The project root directory (defaults to cwd)
|
|
912
919
|
* @returns True if the project has .attest-it/config.yaml or similar
|
|
913
920
|
* @public
|
|
@@ -1738,16 +1745,19 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1738
1745
|
github: z.ZodOptional<z.ZodString>;
|
|
1739
1746
|
name: z.ZodString;
|
|
1740
1747
|
publicKey: z.ZodString;
|
|
1748
|
+
publicKeyAlgorithm: z.ZodOptional<z.ZodLiteral<"ed25519">>;
|
|
1741
1749
|
}, "strict", z.ZodTypeAny, {
|
|
1742
1750
|
email?: string | undefined;
|
|
1743
1751
|
github?: string | undefined;
|
|
1744
1752
|
name: string;
|
|
1745
1753
|
publicKey: string;
|
|
1754
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1746
1755
|
}, {
|
|
1747
1756
|
email?: string | undefined;
|
|
1748
1757
|
github?: string | undefined;
|
|
1749
1758
|
name: string;
|
|
1750
1759
|
publicKey: string;
|
|
1760
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1751
1761
|
}>>>;
|
|
1752
1762
|
version: z.ZodLiteral<1>;
|
|
1753
1763
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1772,6 +1782,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1772
1782
|
github?: string | undefined;
|
|
1773
1783
|
name: string;
|
|
1774
1784
|
publicKey: string;
|
|
1785
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1775
1786
|
}> | undefined;
|
|
1776
1787
|
version: 1;
|
|
1777
1788
|
}, {
|
|
@@ -1796,6 +1807,7 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1796
1807
|
github?: string | undefined;
|
|
1797
1808
|
name: string;
|
|
1798
1809
|
publicKey: string;
|
|
1810
|
+
publicKeyAlgorithm?: "ed25519" | undefined;
|
|
1799
1811
|
}> | undefined;
|
|
1800
1812
|
version: 1;
|
|
1801
1813
|
}>;
|
|
@@ -1956,16 +1968,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1956
1968
|
export declare function savePreferences(preferences: UserPreferences): Promise<void>;
|
|
1957
1969
|
|
|
1958
1970
|
/**
|
|
1959
|
-
* Save a public key to the user's home directory
|
|
1971
|
+
* Save a public key to the user's home directory.
|
|
1960
1972
|
*
|
|
1961
1973
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1962
|
-
* to
|
|
1963
|
-
*
|
|
1964
|
-
*
|
|
1974
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
1975
|
+
*
|
|
1976
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
1977
|
+
* written to the project directory.
|
|
1965
1978
|
*
|
|
1966
1979
|
* @param slug - The identity slug (used for the filename)
|
|
1967
1980
|
* @param publicKey - The base64-encoded public key
|
|
1968
|
-
* @param projectRoot - The project root directory (
|
|
1981
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1969
1982
|
* @returns Paths where the key was saved
|
|
1970
1983
|
* @public
|
|
1971
1984
|
*/
|
|
@@ -1983,16 +1996,17 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
1983
1996
|
}
|
|
1984
1997
|
|
|
1985
1998
|
/**
|
|
1986
|
-
* Save a public key to the user's home directory
|
|
1999
|
+
* Save a public key to the user's home directory (sync).
|
|
1987
2000
|
*
|
|
1988
2001
|
* This saves the public key as a base64-encoded string (matching the format in config.yaml)
|
|
1989
|
-
* to
|
|
1990
|
-
*
|
|
1991
|
-
*
|
|
2002
|
+
* to ~/.attest-it/public-keys/<slug>.pem for backup purposes.
|
|
2003
|
+
*
|
|
2004
|
+
* Public keys are now stored inline in the team section of config.yaml and no longer
|
|
2005
|
+
* written to the project directory.
|
|
1992
2006
|
*
|
|
1993
2007
|
* @param slug - The identity slug (used for the filename)
|
|
1994
2008
|
* @param publicKey - The base64-encoded public key
|
|
1995
|
-
* @param projectRoot - The project root directory (
|
|
2009
|
+
* @param projectRoot - The project root directory (deprecated, kept for backward compatibility)
|
|
1996
2010
|
* @returns Paths where the key was saved
|
|
1997
2011
|
* @public
|
|
1998
2012
|
*/
|
|
@@ -2193,6 +2207,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
|
|
|
2193
2207
|
github?: string | undefined;
|
|
2194
2208
|
/** Base64-encoded Ed25519 public key */
|
|
2195
2209
|
publicKey: string;
|
|
2210
|
+
/** Public key algorithm (optional, for future-proofing format changes) */
|
|
2211
|
+
publicKeyAlgorithm?: 'ed25519' | undefined;
|
|
2196
2212
|
}
|
|
2197
2213
|
|
|
2198
2214
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -335,7 +335,8 @@ var teamMemberSchema = zod.z.object({
|
|
|
335
335
|
name: zod.z.string().min(1, "Team member name cannot be empty"),
|
|
336
336
|
email: zod.z.string().email().optional(),
|
|
337
337
|
github: zod.z.string().min(1).optional(),
|
|
338
|
-
publicKey: zod.z.string().min(1, "Public key is required")
|
|
338
|
+
publicKey: zod.z.string().min(1, "Public key is required"),
|
|
339
|
+
publicKeyAlgorithm: zod.z.enum(["ed25519"]).optional()
|
|
339
340
|
}).strict();
|
|
340
341
|
var fingerprintConfigSchema = zod.z.object({
|
|
341
342
|
paths: zod.z.array(zod.z.string().min(1, "Path cannot be empty")).min(1, "At least one path is required"),
|
|
@@ -566,7 +567,8 @@ var teamMemberSchema2 = zod.z.object({
|
|
|
566
567
|
name: zod.z.string().min(1, "Team member name cannot be empty"),
|
|
567
568
|
email: zod.z.string().email().optional(),
|
|
568
569
|
github: zod.z.string().min(1).optional(),
|
|
569
|
-
publicKey: zod.z.string().min(1, "Public key is required")
|
|
570
|
+
publicKey: zod.z.string().min(1, "Public key is required"),
|
|
571
|
+
publicKeyAlgorithm: zod.z.literal("ed25519").optional()
|
|
570
572
|
}).strict();
|
|
571
573
|
var fingerprintConfigSchema2 = zod.z.object({
|
|
572
574
|
paths: zod.z.array(zod.z.string().min(1, "Path cannot be empty")).min(1, "At least one path is required"),
|
|
@@ -2146,16 +2148,19 @@ function loadLocalConfigSync(configPath) {
|
|
|
2146
2148
|
throw error;
|
|
2147
2149
|
}
|
|
2148
2150
|
}
|
|
2151
|
+
var IDENTITY_SCHEMA_HEADER = "# yaml-language-server: $schema=https://raw.githubusercontent.com/mike-north/attest-it/main/schemas/v1/identity.schema.json\n";
|
|
2149
2152
|
async function saveLocalConfig(config, configPath) {
|
|
2150
2153
|
const resolvedPath = configPath ?? getLocalConfigPath();
|
|
2151
|
-
const
|
|
2154
|
+
const yamlContent = yaml.stringify(config);
|
|
2155
|
+
const content = IDENTITY_SCHEMA_HEADER + yamlContent;
|
|
2152
2156
|
const dir = path2.dirname(resolvedPath);
|
|
2153
2157
|
await fs8.mkdir(dir, { recursive: true });
|
|
2154
2158
|
await fs8.writeFile(resolvedPath, content, "utf8");
|
|
2155
2159
|
}
|
|
2156
2160
|
function saveLocalConfigSync(config, configPath) {
|
|
2157
2161
|
const resolvedPath = configPath ?? getLocalConfigPath();
|
|
2158
|
-
const
|
|
2162
|
+
const yamlContent = yaml.stringify(config);
|
|
2163
|
+
const content = IDENTITY_SCHEMA_HEADER + yamlContent;
|
|
2159
2164
|
const dir = path2.dirname(resolvedPath);
|
|
2160
2165
|
fs.mkdirSync(dir, { recursive: true });
|
|
2161
2166
|
fs.writeFileSync(resolvedPath, content, "utf8");
|
|
@@ -2186,13 +2191,6 @@ async function savePublicKey(slug, publicKey, projectRoot = process.cwd()) {
|
|
|
2186
2191
|
const homePath = path2.join(homeDir, `${slug}.pem`);
|
|
2187
2192
|
await fs8.writeFile(homePath, publicKey, "utf8");
|
|
2188
2193
|
result.homePath = homePath;
|
|
2189
|
-
if (hasProjectConfig(projectRoot)) {
|
|
2190
|
-
const projectDir = getProjectPublicKeysDir(projectRoot);
|
|
2191
|
-
await fs8.mkdir(projectDir, { recursive: true });
|
|
2192
|
-
const projectPath = path2.join(projectDir, `${slug}.pem`);
|
|
2193
|
-
await fs8.writeFile(projectPath, publicKey, "utf8");
|
|
2194
|
-
result.projectPath = projectPath;
|
|
2195
|
-
}
|
|
2196
2194
|
return result;
|
|
2197
2195
|
}
|
|
2198
2196
|
function savePublicKeySync(slug, publicKey, projectRoot = process.cwd()) {
|
|
@@ -2204,13 +2202,6 @@ function savePublicKeySync(slug, publicKey, projectRoot = process.cwd()) {
|
|
|
2204
2202
|
const homePath = path2.join(homeDir, `${slug}.pem`);
|
|
2205
2203
|
fs.writeFileSync(homePath, publicKey, "utf8");
|
|
2206
2204
|
result.homePath = homePath;
|
|
2207
|
-
if (hasProjectConfig(projectRoot)) {
|
|
2208
|
-
const projectDir = getProjectPublicKeysDir(projectRoot);
|
|
2209
|
-
fs.mkdirSync(projectDir, { recursive: true });
|
|
2210
|
-
const projectPath = path2.join(projectDir, `${slug}.pem`);
|
|
2211
|
-
fs.writeFileSync(projectPath, publicKey, "utf8");
|
|
2212
|
-
result.projectPath = projectPath;
|
|
2213
|
-
}
|
|
2214
2205
|
return result;
|
|
2215
2206
|
}
|
|
2216
2207
|
|