Add generated .d.ts and .d.ts.map files

This commit is contained in:
bexnoss 2022-01-31 17:25:55 +01:00
parent 6ae21f0d45
commit 1173a1039c
44 changed files with 416 additions and 0 deletions

View File

@ -0,0 +1,19 @@
export declare enum State {
STATE_CACHE_PRIMARY_KEY = 'cache-primary-key',
CACHE_MATCHED_KEY = 'cache-matched-key',
CACHE_PATHS = 'cache-paths'
}
declare abstract class CacheDistributor {
protected packageManager: string;
protected cacheDependencyPath: string;
protected CACHE_KEY_PREFIX: string;
constructor(packageManager: string, cacheDependencyPath: string);
protected abstract getCacheGlobalDirectories(): Promise<string[]>;
protected abstract computeKeys(): Promise<{
primaryKey: string;
restoreKey: string[] | undefined;
}>;
restoreCache(): Promise<void>;
}
export default CacheDistributor;
//# sourceMappingURL=cache-distributor.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"cache-distributor.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/cache-distributor.ts"],"names":[],"mappings":"AAGA,oBAAY,KAAK;IACf,uBAAuB,sBAAsB;IAC7C,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;CAC5B;AAED,uBAAe,gBAAgB;IAG3B,SAAS,CAAC,cAAc,EAAE,MAAM;IAChC,SAAS,CAAC,mBAAmB,EAAE,MAAM;IAHvC,SAAS,CAAC,gBAAgB,SAAkB;gBAEhC,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,MAAM;IAGvC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACjE,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC;QACxC,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;KAClC,CAAC;IAEW,YAAY;CA4B1B;AAED,eAAe,gBAAgB,CAAC"}

View File

@ -0,0 +1,12 @@
import PipCache from './pip-cache';
import PipenvCache from './pipenv-cache';
export declare enum PackageManagers {
Pip = 'pip',
Pipenv = 'pipenv'
}
export declare function getCacheDistributor(
packageManager: string,
pythonVersion: string,
cacheDependencyPath: string | undefined
): PipCache | PipenvCache;
//# sourceMappingURL=cache-factory.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"cache-factory.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/cache-factory.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,oBAAY,eAAe;IACzB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS,0BAUxC"}

View File

@ -0,0 +1,12 @@
import CacheDistributor from './cache-distributor';
declare class PipCache extends CacheDistributor {
private pythonVersion;
constructor(pythonVersion: string, cacheDependencyPath?: string);
protected getCacheGlobalDirectories(): Promise<string[]>;
protected computeKeys(): Promise<{
primaryKey: string;
restoreKey: string[];
}>;
}
export default PipCache;
//# sourceMappingURL=pip-cache.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pip-cache.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/pip-cache.ts"],"names":[],"mappings":"AAOA,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAEnD,cAAM,QAAS,SAAQ,gBAAgB;IAEnC,OAAO,CAAC,aAAa;gBAAb,aAAa,EAAE,MAAM,EAC7B,mBAAmB,GAAE,MAA8B;cAKrC,yBAAyB;cAsBzB,WAAW;;;;CAU5B;AAED,eAAe,QAAQ,CAAC"}

View File

@ -0,0 +1,13 @@
import CacheDistributor from './cache-distributor';
declare class PipenvCache extends CacheDistributor {
private pythonVersion;
protected patterns: string;
constructor(pythonVersion: string, patterns?: string);
protected getCacheGlobalDirectories(): Promise<string[]>;
protected computeKeys(): Promise<{
primaryKey: string;
restoreKey: undefined;
}>;
}
export default PipenvCache;
//# sourceMappingURL=pipenv-cache.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pipenv-cache.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/pipenv-cache.ts"],"names":[],"mappings":"AAKA,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAEnD,cAAM,WAAY,SAAQ,gBAAgB;IAEtC,OAAO,CAAC,aAAa;IACrB,SAAS,CAAC,QAAQ,EAAE,MAAM;gBADlB,aAAa,EAAE,MAAM,EACnB,QAAQ,GAAE,MAA0B;cAKhC,yBAAyB;cAiBzB,WAAW;;;;CAS5B;AAED,eAAe,WAAW,CAAC"}

1
dist/cache-save/cache-save.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export declare function run(): Promise<void>;

1
dist/cache-save/cache-save.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-save.ts"],"names":[],"mappings":"AAMA,wBAAsB,GAAG,kBAUxB"}

25
dist/cache-save/find-pypy.d.ts vendored Normal file
View File

@ -0,0 +1,25 @@
interface IPyPyVersionSpec {
pypyVersion: string;
pythonVersion: string;
}
export declare function findPyPyVersion(
versionSpec: string,
architecture: string
): Promise<{
resolvedPyPyVersion: string;
resolvedPythonVersion: string;
}>;
export declare function findPyPyToolCache(
pythonVersion: string,
pypyVersion: string,
architecture: string
): {
installDir: string | null;
resolvedPythonVersion: string;
resolvedPyPyVersion: string;
};
export declare function parsePyPyVersion(versionSpec: string): IPyPyVersionSpec;
export declare function findPyPyInstallDirForWindows(
pythonVersion: string
): string;
export {};

1
dist/cache-save/find-pypy.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/find-pypy.ts"],"names":[],"mappings":"AAeA,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,qBAAqB,EAAE,MAAM,CAAA;CAAC,CAAC,CAiCvE;AAED,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM;;;;EAgCrB;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAiCtE;AAED,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAS1E"}

15
dist/cache-save/find-python.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
interface InstalledVersion {
impl: string;
version: string;
}
/**
* Python's prelease versions look like `3.7.0b2`.
* This is the one part of Python versioning that does not look like semantic versioning, which specifies `3.7.0-b2`.
* If the version spec contains prerelease versions, we need to convert them to the semantic version equivalent.
*/
export declare function pythonVersionToSemantic(versionSpec: string): string;
export declare function findPythonVersion(
version: string,
architecture: string
): Promise<InstalledVersion>;
export {};

1
dist/cache-save/find-python.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/find-python.ts"],"names":[],"mappings":"AA8KA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,UAG1D;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAU3B"}

38
dist/cache-save/install-pypy.d.ts vendored Normal file
View File

@ -0,0 +1,38 @@
import {IPyPyManifestRelease} from './utils';
export declare function installPyPy(
pypyVersion: string,
pythonVersion: string,
architecture: string
): Promise<{
installDir: string;
resolvedPythonVersion: string;
resolvedPyPyVersion: string;
}>;
export declare function findRelease(
releases: IPyPyManifestRelease[],
pythonVersion: string,
pypyVersion: string,
architecture: string
): {
foundAsset: any;
resolvedPythonVersion: string;
resolvedPyPyVersion: string;
} | null;
/** Get PyPy binary location from the tool of installation directory
* - On Linux and macOS, the Python interpreter is in 'bin'.
* - On Windows, it is in the installation root.
*/
export declare function getPyPyBinaryPath(installDir: string): string;
export declare function pypyVersionToSemantic(versionSpec: string): string;
export declare function isArchPresentForWindows(item: any): any;
export declare function isArchPresentForMacOrLinux(
item: any,
architecture: string,
platform: string
): any;
export declare function findAssetForWindows(releases: any): any;
export declare function findAssetForMacOrLinux(
releases: any,
architecture: string,
platform: string
): any;

1
dist/cache-save/install-pypy.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/install-pypy.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,oBAAoB,EAIrB,MAAM,SAAS,CAAC;AAEjB,wBAAsB,WAAW,CAC/B,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM;;;;GAyDrB;AAmDD,wBAAgB,WAAW,CACzB,QAAQ,EAAE,oBAAoB,EAAE,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM;;;;SA+CrB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,UAGnD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,UAGxD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,GAAG,OAMhD;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,GAAG,EACT,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,OAKjB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,GAAG,OAMhD;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,GAAG,EACb,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,OAKjB"}

9
dist/cache-save/install-python.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
import * as tc from '@actions/tool-cache';
export declare const MANIFEST_URL: string;
export declare function findReleaseFromManifest(
semanticVersionSpec: string,
architecture: string
): Promise<tc.IToolRelease | undefined>;
export declare function installCpythonFromRelease(
release: tc.IToolRelease
): Promise<void>;

View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/install-python.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAU1C,eAAO,MAAM,YAAY,QAAkI,CAAC;AAE5J,wBAAsB,uBAAuB,CAC3C,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,EAAE,CAAC,YAAY,GAAG,SAAS,CAAC,CAatC;AA2BD,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,iBAevE"}

1
dist/cache-save/setup-python.d.ts vendored Normal file
View File

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

1
dist/cache-save/setup-python.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/setup-python.ts"],"names":[],"mappings":""}

52
dist/cache-save/utils.d.ts vendored Normal file
View File

@ -0,0 +1,52 @@
export declare const IS_WINDOWS: boolean;
export declare const IS_LINUX: boolean;
export declare const WINDOWS_ARCHS: string[];
export declare const WINDOWS_PLATFORMS: string[];
export interface IPyPyManifestAsset {
filename: string;
arch: string;
platform: string;
download_url: string;
}
export interface IPyPyManifestRelease {
pypy_version: string;
python_version: string;
stable: boolean;
latest_pypy: boolean;
files: IPyPyManifestAsset[];
}
/** create Symlinks for downloaded PyPy
* It should be executed only for downloaded versions in runtime, because
* toolcache versions have this setup.
*/
export declare function createSymlinkInFolder(
folderPath: string,
sourceName: string,
targetName: string,
setExecutable?: boolean
): void;
export declare function validateVersion(version: string): boolean;
export declare function isNightlyKeyword(pypyVersion: string): boolean;
export declare function getPyPyVersionFromPath(installDir: string): string;
/**
* In tool-cache, we put PyPy to '<toolcache_root>/PyPy/<python_version>/x64'
* There is no easy way to determine what PyPy version is located in specific folder
* 'pypy --version' is not reliable enough since it is not set properly for preview versions
* "7.3.3rc1" is marked as '7.3.3' in 'pypy --version'
* so we put PYPY_VERSION file to PyPy directory when install it to VM and read it when we need to know version
* PYPY_VERSION contains exact version from 'versions.json'
*/
export declare function readExactPyPyVersionFile(installDir: string): string;
export declare function writeExactPyPyVersionFile(
installDir: string,
resolvedPyPyVersion: string
): void;
/**
* Python version should be specified explicitly like "x.y" (2.7, 3.6, 3.7)
* "3.x" or "3" are not supported
* because it could cause ambiguity when both PyPy version and Python version are not precise
*/
export declare function validatePythonVersionFormatForPyPy(
version: string
): boolean;
export declare function isGhes(): boolean;

1
dist/cache-save/utils.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,SAA+B,CAAC;AACvD,eAAO,MAAM,QAAQ,SAA+B,CAAC;AACrD,eAAO,MAAM,aAAa,UAAiB,CAAC;AAC5C,eAAO,MAAM,iBAAiB,UAAqB,CAAC;AAGpD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,aAAa,UAAQ,QAYtB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,WAE9C;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,WAEnD;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,UAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,UAQ1D;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,MAAM,QAI5B;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,WAGjE;AAED,wBAAgB,MAAM,IAAI,OAAO,CAKhC"}

View File

@ -0,0 +1,19 @@
export declare enum State {
STATE_CACHE_PRIMARY_KEY = 'cache-primary-key',
CACHE_MATCHED_KEY = 'cache-matched-key',
CACHE_PATHS = 'cache-paths'
}
declare abstract class CacheDistributor {
protected packageManager: string;
protected cacheDependencyPath: string;
protected CACHE_KEY_PREFIX: string;
constructor(packageManager: string, cacheDependencyPath: string);
protected abstract getCacheGlobalDirectories(): Promise<string[]>;
protected abstract computeKeys(): Promise<{
primaryKey: string;
restoreKey: string[] | undefined;
}>;
restoreCache(): Promise<void>;
}
export default CacheDistributor;
//# sourceMappingURL=cache-distributor.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"cache-distributor.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/cache-distributor.ts"],"names":[],"mappings":"AAGA,oBAAY,KAAK;IACf,uBAAuB,sBAAsB;IAC7C,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;CAC5B;AAED,uBAAe,gBAAgB;IAG3B,SAAS,CAAC,cAAc,EAAE,MAAM;IAChC,SAAS,CAAC,mBAAmB,EAAE,MAAM;IAHvC,SAAS,CAAC,gBAAgB,SAAkB;gBAEhC,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,MAAM;IAGvC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACjE,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC;QACxC,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;KAClC,CAAC;IAEW,YAAY;CA4B1B;AAED,eAAe,gBAAgB,CAAC"}

View File

@ -0,0 +1,12 @@
import PipCache from './pip-cache';
import PipenvCache from './pipenv-cache';
export declare enum PackageManagers {
Pip = 'pip',
Pipenv = 'pipenv'
}
export declare function getCacheDistributor(
packageManager: string,
pythonVersion: string,
cacheDependencyPath: string | undefined
): PipCache | PipenvCache;
//# sourceMappingURL=cache-factory.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"cache-factory.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/cache-factory.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,oBAAY,eAAe;IACzB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS,0BAUxC"}

View File

@ -0,0 +1,12 @@
import CacheDistributor from './cache-distributor';
declare class PipCache extends CacheDistributor {
private pythonVersion;
constructor(pythonVersion: string, cacheDependencyPath?: string);
protected getCacheGlobalDirectories(): Promise<string[]>;
protected computeKeys(): Promise<{
primaryKey: string;
restoreKey: string[];
}>;
}
export default PipCache;
//# sourceMappingURL=pip-cache.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pip-cache.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/pip-cache.ts"],"names":[],"mappings":"AAOA,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAEnD,cAAM,QAAS,SAAQ,gBAAgB;IAEnC,OAAO,CAAC,aAAa;gBAAb,aAAa,EAAE,MAAM,EAC7B,mBAAmB,GAAE,MAA8B;cAKrC,yBAAyB;cAsBzB,WAAW;;;;CAU5B;AAED,eAAe,QAAQ,CAAC"}

View File

@ -0,0 +1,13 @@
import CacheDistributor from './cache-distributor';
declare class PipenvCache extends CacheDistributor {
private pythonVersion;
protected patterns: string;
constructor(pythonVersion: string, patterns?: string);
protected getCacheGlobalDirectories(): Promise<string[]>;
protected computeKeys(): Promise<{
primaryKey: string;
restoreKey: undefined;
}>;
}
export default PipenvCache;
//# sourceMappingURL=pipenv-cache.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pipenv-cache.d.ts","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-distributions/pipenv-cache.ts"],"names":[],"mappings":"AAKA,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAEnD,cAAM,WAAY,SAAQ,gBAAgB;IAEtC,OAAO,CAAC,aAAa;IACrB,SAAS,CAAC,QAAQ,EAAE,MAAM;gBADlB,aAAa,EAAE,MAAM,EACnB,QAAQ,GAAE,MAA0B;cAKhC,yBAAyB;cAiBzB,WAAW;;;;CAS5B;AAED,eAAe,WAAW,CAAC"}

1
dist/setup/cache-save.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export declare function run(): Promise<void>;

1
dist/setup/cache-save.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/cache-save.ts"],"names":[],"mappings":"AAMA,wBAAsB,GAAG,kBAUxB"}

25
dist/setup/find-pypy.d.ts vendored Normal file
View File

@ -0,0 +1,25 @@
interface IPyPyVersionSpec {
pypyVersion: string;
pythonVersion: string;
}
export declare function findPyPyVersion(
versionSpec: string,
architecture: string
): Promise<{
resolvedPyPyVersion: string;
resolvedPythonVersion: string;
}>;
export declare function findPyPyToolCache(
pythonVersion: string,
pypyVersion: string,
architecture: string
): {
installDir: string | null;
resolvedPythonVersion: string;
resolvedPyPyVersion: string;
};
export declare function parsePyPyVersion(versionSpec: string): IPyPyVersionSpec;
export declare function findPyPyInstallDirForWindows(
pythonVersion: string
): string;
export {};

1
dist/setup/find-pypy.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/find-pypy.ts"],"names":[],"mappings":"AAeA,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,qBAAqB,EAAE,MAAM,CAAA;CAAC,CAAC,CAiCvE;AAED,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM;;;;EAgCrB;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAiCtE;AAED,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAS1E"}

15
dist/setup/find-python.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
interface InstalledVersion {
impl: string;
version: string;
}
/**
* Python's prelease versions look like `3.7.0b2`.
* This is the one part of Python versioning that does not look like semantic versioning, which specifies `3.7.0-b2`.
* If the version spec contains prerelease versions, we need to convert them to the semantic version equivalent.
*/
export declare function pythonVersionToSemantic(versionSpec: string): string;
export declare function findPythonVersion(
version: string,
architecture: string
): Promise<InstalledVersion>;
export {};

1
dist/setup/find-python.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/find-python.ts"],"names":[],"mappings":"AA8KA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,UAG1D;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAU3B"}

38
dist/setup/install-pypy.d.ts vendored Normal file
View File

@ -0,0 +1,38 @@
import {IPyPyManifestRelease} from './utils';
export declare function installPyPy(
pypyVersion: string,
pythonVersion: string,
architecture: string
): Promise<{
installDir: string;
resolvedPythonVersion: string;
resolvedPyPyVersion: string;
}>;
export declare function findRelease(
releases: IPyPyManifestRelease[],
pythonVersion: string,
pypyVersion: string,
architecture: string
): {
foundAsset: any;
resolvedPythonVersion: string;
resolvedPyPyVersion: string;
} | null;
/** Get PyPy binary location from the tool of installation directory
* - On Linux and macOS, the Python interpreter is in 'bin'.
* - On Windows, it is in the installation root.
*/
export declare function getPyPyBinaryPath(installDir: string): string;
export declare function pypyVersionToSemantic(versionSpec: string): string;
export declare function isArchPresentForWindows(item: any): any;
export declare function isArchPresentForMacOrLinux(
item: any,
architecture: string,
platform: string
): any;
export declare function findAssetForWindows(releases: any): any;
export declare function findAssetForMacOrLinux(
releases: any,
architecture: string,
platform: string
): any;

1
dist/setup/install-pypy.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/install-pypy.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,oBAAoB,EAIrB,MAAM,SAAS,CAAC;AAEjB,wBAAsB,WAAW,CAC/B,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM;;;;GAyDrB;AAmDD,wBAAgB,WAAW,CACzB,QAAQ,EAAE,oBAAoB,EAAE,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM;;;;SA+CrB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,UAGnD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,UAGxD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,GAAG,OAMhD;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,GAAG,EACT,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,OAKjB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,GAAG,OAMhD;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,GAAG,EACb,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,OAKjB"}

9
dist/setup/install-python.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
import * as tc from '@actions/tool-cache';
export declare const MANIFEST_URL: string;
export declare function findReleaseFromManifest(
semanticVersionSpec: string,
architecture: string
): Promise<tc.IToolRelease | undefined>;
export declare function installCpythonFromRelease(
release: tc.IToolRelease
): Promise<void>;

1
dist/setup/install-python.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/install-python.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAU1C,eAAO,MAAM,YAAY,QAAkI,CAAC;AAE5J,wBAAsB,uBAAuB,CAC3C,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,EAAE,CAAC,YAAY,GAAG,SAAS,CAAC,CAatC;AA2BD,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,iBAevE"}

1
dist/setup/setup-python.d.ts vendored Normal file
View File

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

1
dist/setup/setup-python.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/setup-python.ts"],"names":[],"mappings":""}

52
dist/setup/utils.d.ts vendored Normal file
View File

@ -0,0 +1,52 @@
export declare const IS_WINDOWS: boolean;
export declare const IS_LINUX: boolean;
export declare const WINDOWS_ARCHS: string[];
export declare const WINDOWS_PLATFORMS: string[];
export interface IPyPyManifestAsset {
filename: string;
arch: string;
platform: string;
download_url: string;
}
export interface IPyPyManifestRelease {
pypy_version: string;
python_version: string;
stable: boolean;
latest_pypy: boolean;
files: IPyPyManifestAsset[];
}
/** create Symlinks for downloaded PyPy
* It should be executed only for downloaded versions in runtime, because
* toolcache versions have this setup.
*/
export declare function createSymlinkInFolder(
folderPath: string,
sourceName: string,
targetName: string,
setExecutable?: boolean
): void;
export declare function validateVersion(version: string): boolean;
export declare function isNightlyKeyword(pypyVersion: string): boolean;
export declare function getPyPyVersionFromPath(installDir: string): string;
/**
* In tool-cache, we put PyPy to '<toolcache_root>/PyPy/<python_version>/x64'
* There is no easy way to determine what PyPy version is located in specific folder
* 'pypy --version' is not reliable enough since it is not set properly for preview versions
* "7.3.3rc1" is marked as '7.3.3' in 'pypy --version'
* so we put PYPY_VERSION file to PyPy directory when install it to VM and read it when we need to know version
* PYPY_VERSION contains exact version from 'versions.json'
*/
export declare function readExactPyPyVersionFile(installDir: string): string;
export declare function writeExactPyPyVersionFile(
installDir: string,
resolvedPyPyVersion: string
): void;
/**
* Python version should be specified explicitly like "x.y" (2.7, 3.6, 3.7)
* "3.x" or "3" are not supported
* because it could cause ambiguity when both PyPy version and Python version are not precise
*/
export declare function validatePythonVersionFormatForPyPy(
version: string
): boolean;
export declare function isGhes(): boolean;

1
dist/setup/utils.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/user/projects/setup-python/src/utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,SAA+B,CAAC;AACvD,eAAO,MAAM,QAAQ,SAA+B,CAAC;AACrD,eAAO,MAAM,aAAa,UAAiB,CAAC;AAC5C,eAAO,MAAM,iBAAiB,UAAqB,CAAC;AAGpD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,aAAa,UAAQ,QAYtB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,WAE9C;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,WAEnD;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,UAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,UAQ1D;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,MAAM,QAI5B;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,WAGjE;AAED,wBAAgB,MAAM,IAAI,OAAO,CAKhC"}