@ankhorage/deploy 0.6.0 → 0.7.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/domain/storeListing/StoreListingAsset.d.ts +9 -0
- package/dist/domain/storeListing/StoreListingAsset.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingAsset.js +2 -0
- package/dist/domain/storeListing/StoreListingAsset.js.map +1 -0
- package/dist/domain/storeListing/StoreListingAssetSet.d.ts +9 -0
- package/dist/domain/storeListing/StoreListingAssetSet.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingAssetSet.js +2 -0
- package/dist/domain/storeListing/StoreListingAssetSet.js.map +1 -0
- package/dist/domain/storeListing/StoreListingDesiredState.d.ts +8 -0
- package/dist/domain/storeListing/StoreListingDesiredState.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingDesiredState.js +2 -0
- package/dist/domain/storeListing/StoreListingDesiredState.js.map +1 -0
- package/dist/domain/storeListing/StoreListingDiagnostic.d.ts +12 -0
- package/dist/domain/storeListing/StoreListingDiagnostic.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingDiagnostic.js +2 -0
- package/dist/domain/storeListing/StoreListingDiagnostic.js.map +1 -0
- package/dist/domain/storeListing/StoreListingField.d.ts +2 -0
- package/dist/domain/storeListing/StoreListingField.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingField.js +2 -0
- package/dist/domain/storeListing/StoreListingField.js.map +1 -0
- package/dist/domain/storeListing/StoreListingLocale.d.ts +13 -0
- package/dist/domain/storeListing/StoreListingLocale.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingLocale.js +2 -0
- package/dist/domain/storeListing/StoreListingLocale.js.map +1 -0
- package/dist/domain/storeListing/StoreListingPlan.d.ts +10 -0
- package/dist/domain/storeListing/StoreListingPlan.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingPlan.js +2 -0
- package/dist/domain/storeListing/StoreListingPlan.js.map +1 -0
- package/dist/domain/storeListing/StoreListingPlanStep.d.ts +10 -0
- package/dist/domain/storeListing/StoreListingPlanStep.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingPlanStep.js +2 -0
- package/dist/domain/storeListing/StoreListingPlanStep.js.map +1 -0
- package/dist/domain/storeListing/StoreListingRemoteAssetSet.d.ts +9 -0
- package/dist/domain/storeListing/StoreListingRemoteAssetSet.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingRemoteAssetSet.js +2 -0
- package/dist/domain/storeListing/StoreListingRemoteAssetSet.js.map +1 -0
- package/dist/domain/storeListing/StoreListingTarget.d.ts +2 -0
- package/dist/domain/storeListing/StoreListingTarget.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingTarget.js +2 -0
- package/dist/domain/storeListing/StoreListingTarget.js.map +1 -0
- package/dist/domain/storeListing/StoreListingTargetState.d.ts +13 -0
- package/dist/domain/storeListing/StoreListingTargetState.d.ts.map +1 -0
- package/dist/domain/storeListing/StoreListingTargetState.js +2 -0
- package/dist/domain/storeListing/StoreListingTargetState.js.map +1 -0
- package/dist/domain/storeListing/createStoreListingCurrentRevision.d.ts +3 -0
- package/dist/domain/storeListing/createStoreListingCurrentRevision.d.ts.map +1 -0
- package/dist/domain/storeListing/createStoreListingCurrentRevision.js +16 -0
- package/dist/domain/storeListing/createStoreListingCurrentRevision.js.map +1 -0
- package/dist/domain/storeListing/createStoreListingPlan.d.ts +9 -0
- package/dist/domain/storeListing/createStoreListingPlan.d.ts.map +1 -0
- package/dist/domain/storeListing/createStoreListingPlan.js +85 -0
- package/dist/domain/storeListing/createStoreListingPlan.js.map +1 -0
- package/dist/domain/storeListing/normalizeStoreListingLocale.d.ts +2 -0
- package/dist/domain/storeListing/normalizeStoreListingLocale.d.ts.map +1 -0
- package/dist/domain/storeListing/normalizeStoreListingLocale.js +18 -0
- package/dist/domain/storeListing/normalizeStoreListingLocale.js.map +1 -0
- package/dist/domain/storeListing/storeListingLocaleFieldValue.d.ts +4 -0
- package/dist/domain/storeListing/storeListingLocaleFieldValue.d.ts.map +1 -0
- package/dist/domain/storeListing/storeListingLocaleFieldValue.js +23 -0
- package/dist/domain/storeListing/storeListingLocaleFieldValue.js.map +1 -0
- package/dist/project/storeListing/ProjectStoreListing.d.ts +8 -0
- package/dist/project/storeListing/ProjectStoreListing.d.ts.map +1 -0
- package/dist/project/storeListing/ProjectStoreListing.js +2 -0
- package/dist/project/storeListing/ProjectStoreListing.js.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingAccess.d.ts +7 -0
- package/dist/project/storeListing/ProjectStoreListingAccess.d.ts.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingAccess.js +2 -0
- package/dist/project/storeListing/ProjectStoreListingAccess.js.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingAsset.d.ts +5 -0
- package/dist/project/storeListing/ProjectStoreListingAsset.d.ts.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingAsset.js +2 -0
- package/dist/project/storeListing/ProjectStoreListingAsset.js.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingAssetSet.d.ts +9 -0
- package/dist/project/storeListing/ProjectStoreListingAssetSet.d.ts.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingAssetSet.js +2 -0
- package/dist/project/storeListing/ProjectStoreListingAssetSet.js.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingRuntime.d.ts +17 -0
- package/dist/project/storeListing/ProjectStoreListingRuntime.d.ts.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingRuntime.js +19 -0
- package/dist/project/storeListing/ProjectStoreListingRuntime.js.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingTargetIdentity.d.ts +5 -0
- package/dist/project/storeListing/ProjectStoreListingTargetIdentity.d.ts.map +1 -0
- package/dist/project/storeListing/ProjectStoreListingTargetIdentity.js +2 -0
- package/dist/project/storeListing/ProjectStoreListingTargetIdentity.js.map +1 -0
- package/dist/project/storeListing/createProjectStoreListingRevision.d.ts +4 -0
- package/dist/project/storeListing/createProjectStoreListingRevision.d.ts.map +1 -0
- package/dist/project/storeListing/createProjectStoreListingRevision.js +24 -0
- package/dist/project/storeListing/createProjectStoreListingRevision.js.map +1 -0
- package/dist/project/storeListing/parseStoreListingLocale.d.ts +3 -0
- package/dist/project/storeListing/parseStoreListingLocale.d.ts.map +1 -0
- package/dist/project/storeListing/parseStoreListingLocale.js +76 -0
- package/dist/project/storeListing/parseStoreListingLocale.js.map +1 -0
- package/dist/project/storeListing/readProjectStoreListing.d.ts +5 -0
- package/dist/project/storeListing/readProjectStoreListing.d.ts.map +1 -0
- package/dist/project/storeListing/readProjectStoreListing.js +24 -0
- package/dist/project/storeListing/readProjectStoreListing.js.map +1 -0
- package/dist/project/storeListing/readStoreListingAssets.d.ts +8 -0
- package/dist/project/storeListing/readStoreListingAssets.d.ts.map +1 -0
- package/dist/project/storeListing/readStoreListingAssets.js +110 -0
- package/dist/project/storeListing/readStoreListingAssets.js.map +1 -0
- package/dist/project/storeListing/readStoreListingLocales.d.ts +3 -0
- package/dist/project/storeListing/readStoreListingLocales.d.ts.map +1 -0
- package/dist/project/storeListing/readStoreListingLocales.js +43 -0
- package/dist/project/storeListing/readStoreListingLocales.js.map +1 -0
- package/dist/project/storeListing/resolveProjectStoreListingAccess.d.ts +9 -0
- package/dist/project/storeListing/resolveProjectStoreListingAccess.d.ts.map +1 -0
- package/dist/project/storeListing/resolveProjectStoreListingAccess.js +7 -0
- package/dist/project/storeListing/resolveProjectStoreListingAccess.js.map +1 -0
- package/dist/project/storeListing/resolveProjectStoreListingTargets.d.ts +20 -0
- package/dist/project/storeListing/resolveProjectStoreListingTargets.d.ts.map +1 -0
- package/dist/project/storeListing/resolveProjectStoreListingTargets.js +16 -0
- package/dist/project/storeListing/resolveProjectStoreListingTargets.js.map +1 -0
- package/dist/project/storeListing/toStoreListingDesiredState.d.ts +4 -0
- package/dist/project/storeListing/toStoreListingDesiredState.d.ts.map +1 -0
- package/dist/project/storeListing/toStoreListingDesiredState.js +15 -0
- package/dist/project/storeListing/toStoreListingDesiredState.js.map +1 -0
- package/dist/providers/appStoreConnect/AppStoreConnectTransport.d.ts +1 -1
- package/dist/providers/appStoreConnect/AppStoreConnectTransport.d.ts.map +1 -1
- package/dist/providers/appStoreConnect/AppStoreConnectTransport.js.map +1 -1
- package/dist/providers/appStoreConnect/AppStoreListingContext.d.ts +21 -0
- package/dist/providers/appStoreConnect/AppStoreListingContext.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/AppStoreListingContext.js +2 -0
- package/dist/providers/appStoreConnect/AppStoreListingContext.js.map +1 -0
- package/dist/providers/appStoreConnect/AppStoreListingContextResult.d.ts +14 -0
- package/dist/providers/appStoreConnect/AppStoreListingContextResult.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/AppStoreListingContextResult.js +2 -0
- package/dist/providers/appStoreConnect/AppStoreListingContextResult.js.map +1 -0
- package/dist/providers/appStoreConnect/appStoreListingFields.d.ts +2 -0
- package/dist/providers/appStoreConnect/appStoreListingFields.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/appStoreListingFields.js +11 -0
- package/dist/providers/appStoreConnect/appStoreListingFields.js.map +1 -0
- package/dist/providers/appStoreConnect/appStoreListingUrls.d.ts +5 -0
- package/dist/providers/appStoreConnect/appStoreListingUrls.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/appStoreListingUrls.js +22 -0
- package/dist/providers/appStoreConnect/appStoreListingUrls.js.map +1 -0
- package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.d.ts +4 -0
- package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.js +85 -0
- package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.js.map +1 -0
- package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.d.ts +2 -0
- package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.js +39 -0
- package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.js.map +1 -0
- package/dist/providers/appStoreConnect/isEditableAppStoreListingState.d.ts +2 -0
- package/dist/providers/appStoreConnect/isEditableAppStoreListingState.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/isEditableAppStoreListingState.js +12 -0
- package/dist/providers/appStoreConnect/isEditableAppStoreListingState.js.map +1 -0
- package/dist/providers/appStoreConnect/mapAppStoreLocale.d.ts +2 -0
- package/dist/providers/appStoreConnect/mapAppStoreLocale.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/mapAppStoreLocale.js +112 -0
- package/dist/providers/appStoreConnect/mapAppStoreLocale.js.map +1 -0
- package/dist/providers/appStoreConnect/parseAppStoreAppId.d.ts +2 -0
- package/dist/providers/appStoreConnect/parseAppStoreAppId.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/parseAppStoreAppId.js +22 -0
- package/dist/providers/appStoreConnect/parseAppStoreAppId.js.map +1 -0
- package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.d.ts +8 -0
- package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.js +68 -0
- package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.js.map +1 -0
- package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.d.ts +2 -0
- package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.js +28 -0
- package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.js.map +1 -0
- package/dist/providers/appStoreConnect/readAppStoreJson.d.ts +7 -0
- package/dist/providers/appStoreConnect/readAppStoreJson.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/readAppStoreJson.js +12 -0
- package/dist/providers/appStoreConnect/readAppStoreJson.js.map +1 -0
- package/dist/providers/appStoreConnect/resolveAppStoreListingContext.d.ts +10 -0
- package/dist/providers/appStoreConnect/resolveAppStoreListingContext.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/resolveAppStoreListingContext.js +103 -0
- package/dist/providers/appStoreConnect/resolveAppStoreListingContext.js.map +1 -0
- package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.d.ts +4 -0
- package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.d.ts.map +1 -0
- package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.js +27 -0
- package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.js.map +1 -0
- package/dist/providers/googlePlay/GooglePlayRequestTracker.d.ts +9 -0
- package/dist/providers/googlePlay/GooglePlayRequestTracker.d.ts.map +1 -0
- package/dist/providers/googlePlay/GooglePlayRequestTracker.js +13 -0
- package/dist/providers/googlePlay/GooglePlayRequestTracker.js.map +1 -0
- package/dist/providers/googlePlay/GooglePlayStoreListingResult.d.ts +14 -0
- package/dist/providers/googlePlay/GooglePlayStoreListingResult.d.ts.map +1 -0
- package/dist/providers/googlePlay/GooglePlayStoreListingResult.js +2 -0
- package/dist/providers/googlePlay/GooglePlayStoreListingResult.js.map +1 -0
- package/dist/providers/googlePlay/GooglePlayTransport.d.ts +1 -1
- package/dist/providers/googlePlay/GooglePlayTransport.d.ts.map +1 -1
- package/dist/providers/googlePlay/GooglePlayTransport.js.map +1 -1
- package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.d.ts +4 -0
- package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.d.ts.map +1 -0
- package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.js +52 -0
- package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.js.map +1 -0
- package/dist/providers/googlePlay/googlePlayListingUrls.d.ts +5 -0
- package/dist/providers/googlePlay/googlePlayListingUrls.d.ts.map +1 -0
- package/dist/providers/googlePlay/googlePlayListingUrls.js +21 -0
- package/dist/providers/googlePlay/googlePlayListingUrls.js.map +1 -0
- package/dist/providers/googlePlay/googlePlayStoreListingFields.d.ts +2 -0
- package/dist/providers/googlePlay/googlePlayStoreListingFields.d.ts.map +1 -0
- package/dist/providers/googlePlay/googlePlayStoreListingFields.js +7 -0
- package/dist/providers/googlePlay/googlePlayStoreListingFields.js.map +1 -0
- package/dist/providers/googlePlay/inspectGooglePlayStoreListing.d.ts +15 -0
- package/dist/providers/googlePlay/inspectGooglePlayStoreListing.d.ts.map +1 -0
- package/dist/providers/googlePlay/inspectGooglePlayStoreListing.js +105 -0
- package/dist/providers/googlePlay/inspectGooglePlayStoreListing.js.map +1 -0
- package/dist/providers/googlePlay/listGooglePlayImageHashes.d.ts +2 -0
- package/dist/providers/googlePlay/listGooglePlayImageHashes.d.ts.map +1 -0
- package/dist/providers/googlePlay/listGooglePlayImageHashes.js +2 -0
- package/dist/providers/googlePlay/listGooglePlayImageHashes.js.map +1 -0
- package/dist/providers/googlePlay/mapGooglePlayImageType.d.ts +2 -0
- package/dist/providers/googlePlay/mapGooglePlayImageType.d.ts.map +1 -0
- package/dist/providers/googlePlay/mapGooglePlayImageType.js +21 -0
- package/dist/providers/googlePlay/mapGooglePlayImageType.js.map +1 -0
- package/dist/providers/googlePlay/parseGooglePlayListings.d.ts +3 -0
- package/dist/providers/googlePlay/parseGooglePlayListings.d.ts.map +1 -0
- package/dist/providers/googlePlay/parseGooglePlayListings.js +47 -0
- package/dist/providers/googlePlay/parseGooglePlayListings.js.map +1 -0
- package/dist/providers/googlePlay/readGooglePlayAssetSets.d.ts +11 -0
- package/dist/providers/googlePlay/readGooglePlayAssetSets.d.ts.map +1 -0
- package/dist/providers/googlePlay/readGooglePlayAssetSets.js +32 -0
- package/dist/providers/googlePlay/readGooglePlayAssetSets.js.map +1 -0
- package/dist/providers/googlePlay/readGooglePlayImages.d.ts +10 -0
- package/dist/providers/googlePlay/readGooglePlayImages.d.ts.map +1 -0
- package/dist/providers/googlePlay/readGooglePlayImages.js +31 -0
- package/dist/providers/googlePlay/readGooglePlayImages.js.map +1 -0
- package/dist/providers/googlePlay/replaceGooglePlayImages.d.ts +12 -0
- package/dist/providers/googlePlay/replaceGooglePlayImages.d.ts.map +1 -0
- package/dist/providers/googlePlay/replaceGooglePlayImages.js +35 -0
- package/dist/providers/googlePlay/replaceGooglePlayImages.js.map +1 -0
- package/dist/providers/googlePlay/writeGooglePlayListing.d.ts +12 -0
- package/dist/providers/googlePlay/writeGooglePlayListing.d.ts.map +1 -0
- package/dist/providers/googlePlay/writeGooglePlayListing.js +21 -0
- package/dist/providers/googlePlay/writeGooglePlayListing.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectStoreListingAssetSet.js","sourceRoot":"","sources":["../../../src/project/storeListing/ProjectStoreListingAssetSet.ts"],"names":[],"mappings":"","sourcesContent":["import type { StoreListingTarget } from '../../domain/storeListing/StoreListingTarget';\nimport type { ProjectStoreListingAsset } from './ProjectStoreListingAsset';\n\nexport interface ProjectStoreListingAssetSet {\n readonly target: StoreListingTarget;\n readonly locale: string;\n readonly variant: string;\n readonly assets: readonly ProjectStoreListingAsset[];\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type AppStoreConnectTokenFactory } from '../../providers/appStoreConnect/AppStoreConnectTokenFactory';
|
|
2
|
+
import { type AppStoreConnectTransport } from '../../providers/appStoreConnect/AppStoreConnectTransport';
|
|
3
|
+
import { type AppStoreUploadTransport } from '../../providers/appStoreConnect/AppStoreUploadTransport';
|
|
4
|
+
import { type GooglePlayTokenFactory } from '../../providers/googlePlay/GooglePlayTokenFactory';
|
|
5
|
+
import { type GooglePlayTransport } from '../../providers/googlePlay/GooglePlayTransport';
|
|
6
|
+
export interface ProjectStoreListingRuntime {
|
|
7
|
+
readonly createGooglePlayToken: GooglePlayTokenFactory;
|
|
8
|
+
readonly requestGooglePlay: GooglePlayTransport;
|
|
9
|
+
readonly createAppStoreConnectToken: AppStoreConnectTokenFactory;
|
|
10
|
+
readonly requestAppStoreConnect: AppStoreConnectTransport;
|
|
11
|
+
readonly uploadAppStore: AppStoreUploadTransport;
|
|
12
|
+
readonly waitForAppStoreProcessing: () => Promise<void>;
|
|
13
|
+
readonly maxAppStoreProcessingAttempts: number;
|
|
14
|
+
readonly now: () => Date;
|
|
15
|
+
}
|
|
16
|
+
export declare const projectStoreListingRuntime: ProjectStoreListingRuntime;
|
|
17
|
+
//# sourceMappingURL=ProjectStoreListingRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectStoreListingRuntime.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/ProjectStoreListingRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,0DAA0D,CAAC;AAClE,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gDAAgD,CAAC;AAExD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,qBAAqB,EAAE,sBAAsB,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;IAChD,QAAQ,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;IACjE,QAAQ,CAAC,sBAAsB,EAAE,wBAAwB,CAAC;IAC1D,QAAQ,CAAC,cAAc,EAAE,uBAAuB,CAAC;IACjD,QAAQ,CAAC,yBAAyB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,QAAQ,CAAC,6BAA6B,EAAE,MAAM,CAAC;IAC/C,QAAQ,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,0BAA0B,EAAE,0BASxC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createAppStoreConnectToken, } from '../../providers/appStoreConnect/AppStoreConnectTokenFactory';
|
|
2
|
+
import { fetchAppStoreConnect, } from '../../providers/appStoreConnect/AppStoreConnectTransport';
|
|
3
|
+
import { fetchAppStoreUpload, } from '../../providers/appStoreConnect/AppStoreUploadTransport';
|
|
4
|
+
import { createGooglePlayAccessToken, } from '../../providers/googlePlay/GooglePlayTokenFactory';
|
|
5
|
+
import { fetchGooglePlay, } from '../../providers/googlePlay/GooglePlayTransport';
|
|
6
|
+
export const projectStoreListingRuntime = {
|
|
7
|
+
createGooglePlayToken: createGooglePlayAccessToken,
|
|
8
|
+
requestGooglePlay: fetchGooglePlay,
|
|
9
|
+
createAppStoreConnectToken,
|
|
10
|
+
requestAppStoreConnect: fetchAppStoreConnect,
|
|
11
|
+
uploadAppStore: fetchAppStoreUpload,
|
|
12
|
+
waitForAppStoreProcessing: () => delay(5_000),
|
|
13
|
+
maxAppStoreProcessingAttempts: 120,
|
|
14
|
+
now: () => new Date(),
|
|
15
|
+
};
|
|
16
|
+
function delay(milliseconds) {
|
|
17
|
+
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ProjectStoreListingRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectStoreListingRuntime.js","sourceRoot":"","sources":["../../../src/project/storeListing/ProjectStoreListingRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,0BAA0B,GAC3B,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAEL,oBAAoB,GACrB,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAEL,mBAAmB,GACpB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EACL,2BAA2B,GAE5B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,eAAe,GAEhB,MAAM,gDAAgD,CAAC;AAaxD,MAAM,CAAC,MAAM,0BAA0B,GAA+B;IACpE,qBAAqB,EAAE,2BAA2B;IAClD,iBAAiB,EAAE,eAAe;IAClC,0BAA0B;IAC1B,sBAAsB,EAAE,oBAAoB;IAC5C,cAAc,EAAE,mBAAmB;IACnC,yBAAyB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;IAC7C,6BAA6B,EAAE,GAAG;IAClC,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;CACtB,CAAC;AAEF,SAAS,KAAK,CAAC,YAAoB;IACjC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;AACrE,CAAC","sourcesContent":["import {\n type AppStoreConnectTokenFactory,\n createAppStoreConnectToken,\n} from '../../providers/appStoreConnect/AppStoreConnectTokenFactory';\nimport {\n type AppStoreConnectTransport,\n fetchAppStoreConnect,\n} from '../../providers/appStoreConnect/AppStoreConnectTransport';\nimport {\n type AppStoreUploadTransport,\n fetchAppStoreUpload,\n} from '../../providers/appStoreConnect/AppStoreUploadTransport';\nimport {\n createGooglePlayAccessToken,\n type GooglePlayTokenFactory,\n} from '../../providers/googlePlay/GooglePlayTokenFactory';\nimport {\n fetchGooglePlay,\n type GooglePlayTransport,\n} from '../../providers/googlePlay/GooglePlayTransport';\n\nexport interface ProjectStoreListingRuntime {\n readonly createGooglePlayToken: GooglePlayTokenFactory;\n readonly requestGooglePlay: GooglePlayTransport;\n readonly createAppStoreConnectToken: AppStoreConnectTokenFactory;\n readonly requestAppStoreConnect: AppStoreConnectTransport;\n readonly uploadAppStore: AppStoreUploadTransport;\n readonly waitForAppStoreProcessing: () => Promise<void>;\n readonly maxAppStoreProcessingAttempts: number;\n readonly now: () => Date;\n}\n\nexport const projectStoreListingRuntime: ProjectStoreListingRuntime = {\n createGooglePlayToken: createGooglePlayAccessToken,\n requestGooglePlay: fetchGooglePlay,\n createAppStoreConnectToken,\n requestAppStoreConnect: fetchAppStoreConnect,\n uploadAppStore: fetchAppStoreUpload,\n waitForAppStoreProcessing: () => delay(5_000),\n maxAppStoreProcessingAttempts: 120,\n now: () => new Date(),\n};\n\nfunction delay(milliseconds: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectStoreListingTargetIdentity.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/ProjectStoreListingTargetIdentity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectStoreListingTargetIdentity.js","sourceRoot":"","sources":["../../../src/project/storeListing/ProjectStoreListingTargetIdentity.ts"],"names":[],"mappings":"","sourcesContent":["export interface ProjectStoreListingTargetIdentity {\n readonly androidPackageName?: string;\n readonly iosBundleIdentifier?: string;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StoreListingLocale } from '../../domain/storeListing/StoreListingLocale';
|
|
2
|
+
import type { ProjectStoreListingAssetSet } from './ProjectStoreListingAssetSet';
|
|
3
|
+
export declare function createProjectStoreListingRevision(locales: readonly StoreListingLocale[], assetSets: readonly ProjectStoreListingAssetSet[]): string;
|
|
4
|
+
//# sourceMappingURL=createProjectStoreListingRevision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createProjectStoreListingRevision.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/createProjectStoreListingRevision.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,SAAS,kBAAkB,EAAE,EACtC,SAAS,EAAE,SAAS,2BAA2B,EAAE,GAChD,MAAM,CAMR"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
export function createProjectStoreListingRevision(locales, assetSets) {
|
|
3
|
+
const value = {
|
|
4
|
+
locales: locales.slice().sort((a, b) => a.locale.localeCompare(b.locale)),
|
|
5
|
+
assetSets: assetSets.slice().sort(compareSets).map(toCanonicalSet),
|
|
6
|
+
};
|
|
7
|
+
return createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
8
|
+
}
|
|
9
|
+
function toCanonicalSet(set) {
|
|
10
|
+
return {
|
|
11
|
+
target: set.target,
|
|
12
|
+
locale: set.locale,
|
|
13
|
+
variant: set.variant,
|
|
14
|
+
assets: set.assets.map(toCanonicalAsset),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function toCanonicalAsset(asset) {
|
|
18
|
+
const { sourcePath: _sourcePath, ...canonical } = asset;
|
|
19
|
+
return canonical;
|
|
20
|
+
}
|
|
21
|
+
function compareSets(a, b) {
|
|
22
|
+
return `${a.target}:${a.locale}:${a.variant}`.localeCompare(`${b.target}:${b.locale}:${b.variant}`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=createProjectStoreListingRevision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createProjectStoreListingRevision.js","sourceRoot":"","sources":["../../../src/project/storeListing/createProjectStoreListingRevision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOzC,MAAM,UAAU,iCAAiC,CAC/C,OAAsC,EACtC,SAAiD;IAEjD,MAAM,KAAK,GAAG;QACZ,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACzE,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC;KACnE,CAAC;IACF,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED,SAAS,cAAc,CAAC,GAAgC;IACtD,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;KACzC,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAA+B;IACvD,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IACxD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,WAAW,CAAC,CAA8B,EAAE,CAA8B;IACjF,OAAO,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,aAAa,CACzD,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,EAAE,CACvC,CAAC;AACJ,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport type { StoreListingAsset } from '../../domain/storeListing/StoreListingAsset';\nimport type { StoreListingLocale } from '../../domain/storeListing/StoreListingLocale';\nimport type { ProjectStoreListingAsset } from './ProjectStoreListingAsset';\nimport type { ProjectStoreListingAssetSet } from './ProjectStoreListingAssetSet';\n\nexport function createProjectStoreListingRevision(\n locales: readonly StoreListingLocale[],\n assetSets: readonly ProjectStoreListingAssetSet[],\n): string {\n const value = {\n locales: locales.slice().sort((a, b) => a.locale.localeCompare(b.locale)),\n assetSets: assetSets.slice().sort(compareSets).map(toCanonicalSet),\n };\n return createHash('sha256').update(JSON.stringify(value)).digest('hex');\n}\n\nfunction toCanonicalSet(set: ProjectStoreListingAssetSet) {\n return {\n target: set.target,\n locale: set.locale,\n variant: set.variant,\n assets: set.assets.map(toCanonicalAsset),\n };\n}\n\nfunction toCanonicalAsset(asset: ProjectStoreListingAsset): StoreListingAsset {\n const { sourcePath: _sourcePath, ...canonical } = asset;\n return canonical;\n}\n\nfunction compareSets(a: ProjectStoreListingAssetSet, b: ProjectStoreListingAssetSet): number {\n return `${a.target}:${a.locale}:${a.variant}`.localeCompare(\n `${b.target}:${b.locale}:${b.variant}`,\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseStoreListingLocale.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/parseStoreListingLocale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAiBvF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,EACd,cAAc,EAAE,MAAM,GACrB,kBAAkB,CAiBpB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { normalizeStoreListingLocale } from '../../domain/storeListing/normalizeStoreListingLocale';
|
|
2
|
+
import { hasOnlyKeys } from '../io/hasOnlyKeys';
|
|
3
|
+
import { isRecord } from '../io/isRecord';
|
|
4
|
+
const KEYS = new Set([
|
|
5
|
+
'locale',
|
|
6
|
+
'name',
|
|
7
|
+
'summary',
|
|
8
|
+
'description',
|
|
9
|
+
'keywords',
|
|
10
|
+
'promotionalText',
|
|
11
|
+
'supportUrl',
|
|
12
|
+
'marketingUrl',
|
|
13
|
+
'privacyPolicyUrl',
|
|
14
|
+
'promoVideoUrl',
|
|
15
|
+
]);
|
|
16
|
+
export function parseStoreListingLocale(value, filenameLocale) {
|
|
17
|
+
if (!isRecord(value) || !hasOnlyKeys(value, KEYS))
|
|
18
|
+
throw invalid();
|
|
19
|
+
const locale = normalizeStoreListingLocale(filenameLocale);
|
|
20
|
+
if (value.locale !== undefined && normalizeLocale(value.locale) !== locale)
|
|
21
|
+
throw invalid();
|
|
22
|
+
if (!isNonEmptyString(value.name))
|
|
23
|
+
throw invalid();
|
|
24
|
+
return {
|
|
25
|
+
locale,
|
|
26
|
+
name: value.name,
|
|
27
|
+
...optionalString('summary', value.summary),
|
|
28
|
+
...optionalString('description', value.description),
|
|
29
|
+
...optionalKeywords(value.keywords),
|
|
30
|
+
...optionalString('promotionalText', value.promotionalText),
|
|
31
|
+
...optionalUrl('supportUrl', value.supportUrl),
|
|
32
|
+
...optionalUrl('marketingUrl', value.marketingUrl),
|
|
33
|
+
...optionalUrl('privacyPolicyUrl', value.privacyPolicyUrl),
|
|
34
|
+
...optionalUrl('promoVideoUrl', value.promoVideoUrl),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function optionalKeywords(value) {
|
|
38
|
+
if (value === undefined)
|
|
39
|
+
return {};
|
|
40
|
+
if (!Array.isArray(value) || !value.every(isNonEmptyString))
|
|
41
|
+
throw invalid();
|
|
42
|
+
return { keywords: value };
|
|
43
|
+
}
|
|
44
|
+
function optionalString(key, value) {
|
|
45
|
+
if (value === undefined)
|
|
46
|
+
return {};
|
|
47
|
+
if (typeof value !== 'string')
|
|
48
|
+
throw invalid();
|
|
49
|
+
return { [key]: value };
|
|
50
|
+
}
|
|
51
|
+
function optionalUrl(key, value) {
|
|
52
|
+
const result = optionalString(key, value);
|
|
53
|
+
if (value === undefined || value === '')
|
|
54
|
+
return result;
|
|
55
|
+
try {
|
|
56
|
+
const parsed = new URL(value);
|
|
57
|
+
if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:')
|
|
58
|
+
throw invalid();
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
throw invalid();
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
function normalizeLocale(value) {
|
|
66
|
+
if (typeof value !== 'string')
|
|
67
|
+
throw invalid();
|
|
68
|
+
return normalizeStoreListingLocale(value);
|
|
69
|
+
}
|
|
70
|
+
function isNonEmptyString(value) {
|
|
71
|
+
return typeof value === 'string' && value.trim().length > 0;
|
|
72
|
+
}
|
|
73
|
+
function invalid() {
|
|
74
|
+
return new Error('STORE_LISTING_LOCALE_INVALID');
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=parseStoreListingLocale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseStoreListingLocale.js","sourceRoot":"","sources":["../../../src/project/storeListing/parseStoreListingLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAEpG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC;IACnB,QAAQ;IACR,MAAM;IACN,SAAS;IACT,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,eAAe;CAChB,CAAC,CAAC;AAEH,MAAM,UAAU,uBAAuB,CACrC,KAAc,EACd,cAAsB;IAEtB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;QAAE,MAAM,OAAO,EAAE,CAAC;IACnE,MAAM,MAAM,GAAG,2BAA2B,CAAC,cAAc,CAAC,CAAC;IAC3D,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM;QAAE,MAAM,OAAO,EAAE,CAAC;IAC5F,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,MAAM,OAAO,EAAE,CA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,KAAK,KAAK,EAAE;QAAE,OAAO,MAAM,CAAC;IACvD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,KAAe,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO;YAAE,MAAM,OAAO,EAAE,CAAC;IACnF,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,OAAO,EAAE,CAAC;IAC/C,OAAO,2BAA2B,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,OAAO;IACd,OAAO,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import { normalizeStoreListingLocale } from '../../domain/storeListing/normalizeStoreListingLocale';\nimport type { StoreListingLocale } from '../../domain/storeListing/StoreListingLocale';\nimport { hasOnlyKeys } from '../io/hasOnlyKeys';\nimport { isRecord } from '../io/isRecord';\n\nconst KEYS = new Set([\n 'locale',\n 'name',\n 'summary',\n 'description',\n 'keywords',\n 'promotionalText',\n 'supportUrl',\n 'marketingUrl',\n 'privacyPolicyUrl',\n 'promoVideoUrl',\n]);\n\nexport function parseStoreListingLocale(\n value: unknown,\n filenameLocale: string,\n): StoreListingLocale {\n if (!isRecord(value) || !hasOnlyKeys(value, KEYS)) throw invalid();\n const locale = normalizeStoreListingLocale(filenameLocale);\n if (value.locale !== undefined && normalizeLocale(value.locale) !== locale) throw invalid();\n if (!isNonEmptyString(value.name)) throw invalid();\n return {\n locale,\n name: value.name,\n ...optionalString('summary', value.summary),\n ...optionalString('description', value.description),\n ...optionalKeywords(value.keywords),\n ...optionalString('promotionalText', value.promotionalText),\n ...optionalUrl('supportUrl', value.supportUrl),\n ...optionalUrl('marketingUrl', value.marketingUrl),\n ...optionalUrl('privacyPolicyUrl', value.privacyPolicyUrl),\n ...optionalUrl('promoVideoUrl', value.promoVideoUrl),\n };\n}\n\nfunction optionalKeywords(value: unknown): Pick<StoreListingLocale, 'keywords'> {\n if (value === undefined) return {};\n if (!Array.isArray(value) || !value.every(isNonEmptyString)) throw invalid();\n return { keywords: value };\n}\n\nfunction optionalString<K extends keyof StoreListingLocale>(\n key: K,\n value: unknown,\n): Partial<Pick<StoreListingLocale, K>> {\n if (value === undefined) return {};\n if (typeof value !== 'string') throw invalid();\n return { [key]: value } as Partial<Pick<StoreListingLocale, K>>;\n}\n\nfunction optionalUrl<K extends keyof StoreListingLocale>(\n key: K,\n value: unknown,\n): Partial<Pick<StoreListingLocale, K>> {\n const result = optionalString(key, value);\n if (value === undefined || value === '') return result;\n try {\n const parsed = new URL(value as string);\n if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') throw invalid();\n } catch {\n throw invalid();\n }\n return result;\n}\n\nfunction normalizeLocale(value: unknown): string {\n if (typeof value !== 'string') throw invalid();\n return normalizeStoreListingLocale(value);\n}\n\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nfunction invalid(): Error {\n return new Error('STORE_LISTING_LOCALE_INVALID');\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readProjectStoreListing.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/readProjectStoreListing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAc/B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { resolveProjectDeploymentPaths } from '../resolveProjectDeploymentPaths';
|
|
2
|
+
import { createProjectStoreListingRevision } from './createProjectStoreListingRevision';
|
|
3
|
+
import { readStoreListingAssetSets } from './readStoreListingAssets';
|
|
4
|
+
import { readStoreListingLocales } from './readStoreListingLocales';
|
|
5
|
+
export async function readProjectStoreListing(options) {
|
|
6
|
+
const paths = resolveProjectDeploymentPaths(options.projectRoot);
|
|
7
|
+
const locales = await readStoreListingLocales(paths.listingRoot);
|
|
8
|
+
const assetSets = await readStoreListingAssetSets({
|
|
9
|
+
projectRoot: paths.projectRoot,
|
|
10
|
+
androidRoot: paths.androidAssetsRoot,
|
|
11
|
+
iosRoot: paths.iosScreenshotsRoot,
|
|
12
|
+
locales: locales.map((item) => item.locale),
|
|
13
|
+
});
|
|
14
|
+
assertAssetLocales(locales.map((item) => item.locale), assetSets.map((item) => item.locale));
|
|
15
|
+
return { locales, assetSets, revision: createProjectStoreListingRevision(locales, assetSets) };
|
|
16
|
+
}
|
|
17
|
+
function assertAssetLocales(locales, assetLocales) {
|
|
18
|
+
const known = new Set(locales);
|
|
19
|
+
for (const locale of assetLocales) {
|
|
20
|
+
if (!known.has(locale))
|
|
21
|
+
throw new Error('STORE_LISTING_ASSET_LOCALE_UNKNOWN');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=readProjectStoreListing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readProjectStoreListing.js","sourceRoot":"","sources":["../../../src/project/storeListing/readProjectStoreListing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,OAE7C;IACC,MAAM,KAAK,GAAG,6BAA6B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,MAAM,uBAAuB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,MAAM,yBAAyB,CAAC;QAChD,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,WAAW,EAAE,KAAK,CAAC,iBAAiB;QACpC,OAAO,EAAE,KAAK,CAAC,kBAAkB;QACjC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;KAC5C,CAAC,CAAC;IACH,kBAAkB,CAChB,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAClC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CACrC,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,iCAAiC,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;AACjG,CAAC;AAED,SAAS,kBAAkB,CAAC,OAA0B,EAAE,YAA+B;IACrF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,KAAK,MAAM,MAAM,IAAI,YAAY,EAAE,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAChF,CAAC;AACH,CAAC","sourcesContent":["import { resolveProjectDeploymentPaths } from '../resolveProjectDeploymentPaths';\nimport { createProjectStoreListingRevision } from './createProjectStoreListingRevision';\nimport type { ProjectStoreListing } from './ProjectStoreListing';\nimport { readStoreListingAssetSets } from './readStoreListingAssets';\nimport { readStoreListingLocales } from './readStoreListingLocales';\n\nexport async function readProjectStoreListing(options: {\n readonly projectRoot: string;\n}): Promise<ProjectStoreListing> {\n const paths = resolveProjectDeploymentPaths(options.projectRoot);\n const locales = await readStoreListingLocales(paths.listingRoot);\n const assetSets = await readStoreListingAssetSets({\n projectRoot: paths.projectRoot,\n androidRoot: paths.androidAssetsRoot,\n iosRoot: paths.iosScreenshotsRoot,\n locales: locales.map((item) => item.locale),\n });\n assertAssetLocales(\n locales.map((item) => item.locale),\n assetSets.map((item) => item.locale),\n );\n return { locales, assetSets, revision: createProjectStoreListingRevision(locales, assetSets) };\n}\n\nfunction assertAssetLocales(locales: readonly string[], assetLocales: readonly string[]): void {\n const known = new Set(locales);\n for (const locale of assetLocales) {\n if (!known.has(locale)) throw new Error('STORE_LISTING_ASSET_LOCALE_UNKNOWN');\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProjectStoreListingAssetSet } from './ProjectStoreListingAssetSet';
|
|
2
|
+
export declare function readStoreListingAssetSets(options: {
|
|
3
|
+
readonly projectRoot: string;
|
|
4
|
+
readonly androidRoot: string;
|
|
5
|
+
readonly iosRoot: string;
|
|
6
|
+
readonly locales: readonly string[];
|
|
7
|
+
}): Promise<readonly ProjectStoreListingAssetSet[]>;
|
|
8
|
+
//# sourceMappingURL=readStoreListingAssets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readStoreListingAssets.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/readStoreListingAssets.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,wBAAsB,yBAAyB,CAAC,OAAO,EAAE;IACvD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,GAAG,OAAO,CAAC,SAAS,2BAA2B,EAAE,CAAC,CAIlD"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { promises as fs } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { normalizeStoreListingLocale } from '../../domain/storeListing/normalizeStoreListingLocale';
|
|
5
|
+
import { isMissingPathError } from '../io/isMissingPathError';
|
|
6
|
+
export async function readStoreListingAssetSets(options) {
|
|
7
|
+
const android = await readAndroidAssetSets(options);
|
|
8
|
+
const ios = await readScreenshotAssetSets(options.projectRoot, options.iosRoot, 'ios');
|
|
9
|
+
return [...android, ...ios].sort(compareSets);
|
|
10
|
+
}
|
|
11
|
+
async function readAndroidAssetSets(options) {
|
|
12
|
+
const shared = await readAndroidSharedSets(options);
|
|
13
|
+
const screenshots = await readScreenshotAssetSets(options.projectRoot, path.join(options.androidRoot, 'screenshots'), 'android');
|
|
14
|
+
return [...shared, ...screenshots];
|
|
15
|
+
}
|
|
16
|
+
async function readAndroidSharedSets(options) {
|
|
17
|
+
const definitions = [
|
|
18
|
+
{ filename: 'icon.png', variant: 'icon' },
|
|
19
|
+
{ filename: 'feature.png', variant: 'feature' },
|
|
20
|
+
];
|
|
21
|
+
const result = [];
|
|
22
|
+
for (const definition of definitions) {
|
|
23
|
+
const asset = await readOptionalAsset(options.projectRoot, options.androidRoot, definition.filename);
|
|
24
|
+
if (asset === null)
|
|
25
|
+
continue;
|
|
26
|
+
for (const locale of options.locales) {
|
|
27
|
+
result.push({ target: 'android', locale, variant: definition.variant, assets: [asset] });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
async function readScreenshotAssetSets(projectRoot, root, target) {
|
|
33
|
+
const result = [];
|
|
34
|
+
for (const localeDir of await readDirectories(root)) {
|
|
35
|
+
const locale = normalizeStoreListingLocale(localeDir);
|
|
36
|
+
const localeRoot = path.join(root, localeDir);
|
|
37
|
+
for (const variant of await readDirectories(localeRoot)) {
|
|
38
|
+
const assets = await readVariantAssets(projectRoot, path.join(localeRoot, variant));
|
|
39
|
+
result.push({ target, locale, variant, assets });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
async function readVariantAssets(projectRoot, root) {
|
|
45
|
+
const files = await readImageFiles(root);
|
|
46
|
+
return Promise.all(files.map((file) => createAsset(projectRoot, path.join(root, file))));
|
|
47
|
+
}
|
|
48
|
+
async function readOptionalAsset(projectRoot, root, filename) {
|
|
49
|
+
const sourcePath = path.join(root, filename);
|
|
50
|
+
try {
|
|
51
|
+
await fs.access(sourcePath);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (isMissingPathError(error))
|
|
55
|
+
return null;
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
return createAsset(projectRoot, sourcePath);
|
|
59
|
+
}
|
|
60
|
+
async function createAsset(projectRoot, sourcePath) {
|
|
61
|
+
const bytes = await fs.readFile(sourcePath);
|
|
62
|
+
return {
|
|
63
|
+
sourcePath,
|
|
64
|
+
relativePath: path.relative(projectRoot, sourcePath).split(path.sep).join('/'),
|
|
65
|
+
sha256: createHash('sha256').update(bytes).digest('hex'),
|
|
66
|
+
md5: createHash('md5').update(bytes).digest('hex'),
|
|
67
|
+
size: bytes.byteLength,
|
|
68
|
+
mediaType: mediaType(sourcePath),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async function readDirectories(root) {
|
|
72
|
+
const entries = await readEntries(root);
|
|
73
|
+
return entries
|
|
74
|
+
.filter((entry) => entry.isDirectory())
|
|
75
|
+
.map((entry) => entry.name)
|
|
76
|
+
.sort();
|
|
77
|
+
}
|
|
78
|
+
async function readImageFiles(root) {
|
|
79
|
+
const entries = await fs.readdir(root, { withFileTypes: true });
|
|
80
|
+
if (entries.some((entry) => entry.isFile() && !isImage(entry.name))) {
|
|
81
|
+
throw new Error('STORE_LISTING_ASSET_TYPE_UNSUPPORTED');
|
|
82
|
+
}
|
|
83
|
+
return entries
|
|
84
|
+
.filter(isImageFile)
|
|
85
|
+
.map((entry) => entry.name)
|
|
86
|
+
.sort();
|
|
87
|
+
}
|
|
88
|
+
async function readEntries(root) {
|
|
89
|
+
try {
|
|
90
|
+
return await fs.readdir(root, { withFileTypes: true });
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (isMissingPathError(error))
|
|
94
|
+
return [];
|
|
95
|
+
throw error;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function isImageFile(entry) {
|
|
99
|
+
return entry.isFile() && isImage(entry.name);
|
|
100
|
+
}
|
|
101
|
+
function isImage(filename) {
|
|
102
|
+
return /\.(png|jpe?g)$/i.test(filename);
|
|
103
|
+
}
|
|
104
|
+
function mediaType(filename) {
|
|
105
|
+
return filename.toLowerCase().endsWith('.png') ? 'image/png' : 'image/jpeg';
|
|
106
|
+
}
|
|
107
|
+
function compareSets(a, b) {
|
|
108
|
+
return `${a.target}:${a.locale}:${a.variant}`.localeCompare(`${b.target}:${b.locale}:${b.variant}`);
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=readStoreListingAssets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readStoreListingAssets.js","sourceRoot":"","sources":["../../../src/project/storeListing/readStoreListingAssets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAe,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAGpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,MAAM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AAC,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,aAAa,CACzD,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,EAAE,CACvC,CAAC;AACJ,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\nimport { type Dirent, promises as fs } from 'node:fs';\nimport path from 'node:path';\n\nimport { normalizeStoreListingLocale } from '../../domain/storeListing/normalizeStoreListingLocale';\nimport type { StoreListingAssetMediaType } from '../../domain/storeListing/StoreListingAsset';\nimport type { StoreListingTarget } from '../../domain/storeListing/StoreListingTarget';\nimport { isMissingPathError } from '../io/isMissingPathError';\nimport type { ProjectStoreListingAsset } from './ProjectStoreListingAsset';\nimport type { ProjectStoreListingAssetSet } from './ProjectStoreListingAssetSet';\n\nexport async function readStoreListingAssetSets(options: {\n readonly projectRoot: string;\n readonly androidRoot: string;\n readonly iosRoot: string;\n readonly locales: readonly string[];\n}): Promise<readonly ProjectStoreListingAssetSet[]> {\n const android = await readAndroidAssetSets(options);\n const ios = await readScreenshotAssetSets(options.projectRoot, options.iosRoot, 'ios');\n return [...android, ...ios].sort(compareSets);\n}\n\nasync function readAndroidAssetSets(\n options: Parameters<typeof readStoreListingAssetSets>[0],\n): Promise<ProjectStoreListingAssetSet[]> {\n const shared = await readAndroidSharedSets(options);\n const screenshots = await readScreenshotAssetSets(\n options.projectRoot,\n path.join(options.androidRoot, 'screenshots'),\n 'android',\n );\n return [...shared, ...screenshots];\n}\n\nasync function readAndroidSharedSets(\n options: Parameters<typeof readStoreListingAssetSets>[0],\n): Promise<ProjectStoreListingAssetSet[]> {\n const definitions = [\n { filename: 'icon.png', variant: 'icon' },\n { filename: 'feature.png', variant: 'feature' },\n ] as const;\n const result: ProjectStoreListingAssetSet[] = [];\n for (const definition of definitions) {\n const asset = await readOptionalAsset(\n options.projectRoot,\n options.androidRoot,\n definition.filename,\n );\n if (asset === null) continue;\n for (const locale of options.locales) {\n result.push({ target: 'android', locale, variant: definition.variant, assets: [asset] });\n }\n }\n return result;\n}\n\nasync function readScreenshotAssetSets(\n projectRoot: string,\n root: string,\n target: StoreListingTarget,\n): Promise<ProjectStoreListingAssetSet[]> {\n const result: ProjectStoreListingAssetSet[] = [];\n for (const localeDir of await readDirectories(root)) {\n const locale = normalizeStoreListingLocale(localeDir);\n const localeRoot = path.join(root, localeDir);\n for (const variant of await readDirectories(localeRoot)) {\n const assets = await readVariantAssets(projectRoot, path.join(localeRoot, variant));\n result.push({ target, locale, variant, assets });\n }\n }\n return result;\n}\n\nasync function readVariantAssets(\n projectRoot: string,\n root: string,\n): Promise<ProjectStoreListingAsset[]> {\n const files = await readImageFiles(root);\n return Promise.all(files.map((file) => createAsset(projectRoot, path.join(root, file))));\n}\n\nasync function readOptionalAsset(\n projectRoot: string,\n root: string,\n filename: string,\n): Promise<ProjectStoreListingAsset | null> {\n const sourcePath = path.join(root, filename);\n try {\n await fs.access(sourcePath);\n } catch (error) {\n if (isMissingPathError(error)) return null;\n throw error;\n }\n return createAsset(projectRoot, sourcePath);\n}\n\nasync function createAsset(\n projectRoot: string,\n sourcePath: string,\n): Promise<ProjectStoreListingAsset> {\n const bytes = await fs.readFile(sourcePath);\n return {\n sourcePath,\n relativePath: path.relative(projectRoot, sourcePath).split(path.sep).join('/'),\n sha256: createHash('sha256').update(bytes).digest('hex'),\n md5: createHash('md5').update(bytes).digest('hex'),\n size: bytes.byteLength,\n mediaType: mediaType(sourcePath),\n };\n}\n\nasync function readDirectories(root: string): Promise<string[]> {\n const entries = await readEntries(root);\n return entries\n .filter((entry) => entry.isDirectory())\n .map((entry) => entry.name)\n .sort();\n}\n\nasync function readImageFiles(root: string): Promise<string[]> {\n const entries = await fs.readdir(root, { withFileTypes: true });\n if (entries.some((entry) => entry.isFile() && !isImage(entry.name))) {\n throw new Error('STORE_LISTING_ASSET_TYPE_UNSUPPORTED');\n }\n return entries\n .filter(isImageFile)\n .map((entry) => entry.name)\n .sort();\n}\n\nasync function readEntries(root: string): Promise<Dirent[]> {\n try {\n return await fs.readdir(root, { withFileTypes: true });\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\nfunction isImageFile(entry: Dirent): boolean {\n return entry.isFile() && isImage(entry.name);\n}\n\nfunction isImage(filename: string): boolean {\n return /\\.(png|jpe?g)$/i.test(filename);\n}\n\nfunction mediaType(filename: string): StoreListingAssetMediaType {\n return filename.toLowerCase().endsWith('.png') ? 'image/png' : 'image/jpeg';\n}\n\nfunction compareSets(a: ProjectStoreListingAssetSet, b: ProjectStoreListingAssetSet): number {\n return `${a.target}:${a.locale}:${a.variant}`.localeCompare(\n `${b.target}:${b.locale}:${b.variant}`,\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readStoreListingLocales.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/readStoreListingLocales.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAIvF,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAOxC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { promises as fs } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { isMissingPathError } from '../io/isMissingPathError';
|
|
4
|
+
import { parseStoreListingLocale } from './parseStoreListingLocale';
|
|
5
|
+
export async function readStoreListingLocales(root) {
|
|
6
|
+
const entries = await readEntries(root);
|
|
7
|
+
const files = entries.filter((entry) => entry.isFile() && entry.name.endsWith('.json'));
|
|
8
|
+
const locales = await Promise.all(files.map((entry) => readLocale(root, entry.name)));
|
|
9
|
+
const sorted = locales.sort((a, b) => a.locale.localeCompare(b.locale));
|
|
10
|
+
assertUniqueLocales(sorted);
|
|
11
|
+
return sorted;
|
|
12
|
+
}
|
|
13
|
+
async function readEntries(root) {
|
|
14
|
+
try {
|
|
15
|
+
return await fs.readdir(root, { withFileTypes: true });
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
if (isMissingPathError(error))
|
|
19
|
+
return [];
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function readLocale(root, filename) {
|
|
24
|
+
const filenameLocale = filename.slice(0, -'.json'.length);
|
|
25
|
+
const content = await fs.readFile(path.join(root, filename), 'utf8');
|
|
26
|
+
let value;
|
|
27
|
+
try {
|
|
28
|
+
value = JSON.parse(content);
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
throw new Error('STORE_LISTING_JSON_INVALID');
|
|
32
|
+
}
|
|
33
|
+
return parseStoreListingLocale(value, filenameLocale);
|
|
34
|
+
}
|
|
35
|
+
function assertUniqueLocales(locales) {
|
|
36
|
+
const seen = new Set();
|
|
37
|
+
for (const locale of locales) {
|
|
38
|
+
if (seen.has(locale.locale))
|
|
39
|
+
throw new Error('STORE_LISTING_LOCALE_DUPLICATE');
|
|
40
|
+
seen.add(locale.locale);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=readStoreListingLocales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readStoreListingLocales.js","sourceRoot":"","sources":["../../../src/project/storeListing/readStoreListingLocales.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAAY;IAEZ,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CA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AM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,uBAAuB,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAsC;IACjE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC/E,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC","sourcesContent":["import { type Dirent, promises as fs } from 'node:fs';\nimport path from 'node:path';\n\nimport type { StoreListingLocale } from '../../domain/storeListing/StoreListingLocale';\nimport { isMissingPathError } from '../io/isMissingPathError';\nimport { parseStoreListingLocale } from './parseStoreListingLocale';\n\nexport async function readStoreListingLocales(\n root: string,\n): Promise<readonly StoreListingLocale[]> {\n const entries = await readEntries(root);\n const files = entries.filter((entry) => entry.isFile() && entry.name.endsWith('.json'));\n const locales = await Promise.all(files.map((entry) => readLocale(root, entry.name)));\n const sorted = locales.sort((a, b) => a.locale.localeCompare(b.locale));\n assertUniqueLocales(sorted);\n return sorted;\n}\n\nasync function readEntries(root: string): Promise<Dirent[]> {\n try {\n return await fs.readdir(root, { withFileTypes: true });\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\nasync function readLocale(root: string, filename: string): Promise<StoreListingLocale> {\n const filenameLocale = filename.slice(0, -'.json'.length);\n const content = await fs.readFile(path.join(root, filename), 'utf8');\n let value: unknown;\n try {\n value = JSON.parse(content) as unknown;\n } catch {\n throw new Error('STORE_LISTING_JSON_INVALID');\n }\n return parseStoreListingLocale(value, filenameLocale);\n}\n\nfunction assertUniqueLocales(locales: readonly StoreListingLocale[]): void {\n const seen = new Set<string>();\n for (const locale of locales) {\n if (seen.has(locale.locale)) throw new Error('STORE_LISTING_LOCALE_DUPLICATE');\n seen.add(locale.locale);\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeploymentCredentialReference } from '../../domain/DeploymentCredentialReference';
|
|
2
|
+
import type { DeploymentSecretResolver } from '../../domain/DeploymentSecretResolver';
|
|
3
|
+
import type { ProjectStoreListingAccess } from './ProjectStoreListingAccess';
|
|
4
|
+
export interface ResolvedProjectStoreListingAccess {
|
|
5
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
6
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
7
|
+
}
|
|
8
|
+
export declare function resolveProjectStoreListingAccess(access: ProjectStoreListingAccess): ResolvedProjectStoreListingAccess;
|
|
9
|
+
//# sourceMappingURL=resolveProjectStoreListingAccess.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProjectStoreListingAccess.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/resolveProjectStoreListingAccess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAE7E,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,WAAW,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAC/D,QAAQ,CAAC,aAAa,EAAE,wBAAwB,CAAC;CAClD;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,yBAAyB,GAChC,iCAAiC,CAKnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProjectStoreListingAccess.js","sourceRoot":"","sources":["../../../src/project/storeListing/resolveProjectStoreListingAccess.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,gCAAgC,CAC9C,MAAiC;IAEjC,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE;QACrC,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACrE,CAAC;AACJ,CAAC","sourcesContent":["import type { DeploymentCredentialReference } from '../../domain/DeploymentCredentialReference';\nimport type { DeploymentSecretResolver } from '../../domain/DeploymentSecretResolver';\nimport type { ProjectStoreListingAccess } from './ProjectStoreListingAccess';\n\nexport interface ResolvedProjectStoreListingAccess {\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport function resolveProjectStoreListingAccess(\n access: ProjectStoreListingAccess,\n): ResolvedProjectStoreListingAccess {\n return {\n credentials: access.credentials ?? [],\n resolveSecret: access.resolveSecret ?? (() => Promise.resolve(null)),\n };\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ProjectStoreListingTargetIdentity } from './ProjectStoreListingTargetIdentity';
|
|
2
|
+
interface DeployTargets {
|
|
3
|
+
readonly android?: {
|
|
4
|
+
readonly enabled: boolean;
|
|
5
|
+
readonly package: string;
|
|
6
|
+
readonly providers?: {
|
|
7
|
+
readonly publish?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
readonly ios?: {
|
|
11
|
+
readonly enabled: boolean;
|
|
12
|
+
readonly bundleIdentifier: string;
|
|
13
|
+
readonly providers?: {
|
|
14
|
+
readonly publish?: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare function resolveProjectStoreListingTargets(targets: DeployTargets): ProjectStoreListingTargetIdentity | null;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=resolveProjectStoreListingTargets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProjectStoreListingTargets.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/resolveProjectStoreListingTargets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,UAAU,aAAa;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,SAAS,CAAC,EAAE;YAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACpD,CAAC;IACF,QAAQ,CAAC,GAAG,CAAC,EAAE;QACb,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;QAClC,QAAQ,CAAC,SAAS,CAAC,EAAE;YAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACpD,CAAC;CACH;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,aAAa,GACrB,iCAAiC,GAAG,IAAI,CAU1C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function resolveProjectStoreListingTargets(targets) {
|
|
2
|
+
const { android } = targets;
|
|
3
|
+
const { ios } = targets;
|
|
4
|
+
if (android?.enabled === true && !supported(android.providers?.publish, 'google-play'))
|
|
5
|
+
return null;
|
|
6
|
+
if (ios?.enabled === true && !supported(ios.providers?.publish, 'app-store-connect'))
|
|
7
|
+
return null;
|
|
8
|
+
return {
|
|
9
|
+
...(android?.enabled === true ? { androidPackageName: android.package } : {}),
|
|
10
|
+
...(ios?.enabled === true ? { iosBundleIdentifier: ios.bundleIdentifier } : {}),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function supported(value, expected) {
|
|
14
|
+
return value === undefined || value === expected;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=resolveProjectStoreListingTargets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProjectStoreListingTargets.js","sourceRoot":"","sources":["../../../src/project/storeListing/resolveProjectStoreListingTargets.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,iCAAiC,CAC/C,OAAsB;IAEtB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACxB,IAAI,OAAO,EAAE,OAAO,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,aAAa,CAAC;QACpF,OAAO,IAAI,CAAC;IACd,IAAI,GAAG,EAAE,OAAO,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,mBAAmB,CAAC;QAAE,OAAO,IAAI,CAAC;IAClG,OAAO;QACL,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChF,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,KAAyB,EAAE,QAAgB;IAC5D,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ,CAAC;AACnD,CAAC","sourcesContent":["import type { ProjectStoreListingTargetIdentity } from './ProjectStoreListingTargetIdentity';\n\ninterface DeployTargets {\n readonly android?: {\n readonly enabled: boolean;\n readonly package: string;\n readonly providers?: { readonly publish?: string };\n };\n readonly ios?: {\n readonly enabled: boolean;\n readonly bundleIdentifier: string;\n readonly providers?: { readonly publish?: string };\n };\n}\n\nexport function resolveProjectStoreListingTargets(\n targets: DeployTargets,\n): ProjectStoreListingTargetIdentity | null {\n const { android } = targets;\n const { ios } = targets;\n if (android?.enabled === true && !supported(android.providers?.publish, 'google-play'))\n return null;\n if (ios?.enabled === true && !supported(ios.providers?.publish, 'app-store-connect')) return null;\n return {\n ...(android?.enabled === true ? { androidPackageName: android.package } : {}),\n ...(ios?.enabled === true ? { iosBundleIdentifier: ios.bundleIdentifier } : {}),\n };\n}\n\nfunction supported(value: string | undefined, expected: string): boolean {\n return value === undefined || value === expected;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StoreListingDesiredState } from '../../domain/storeListing/StoreListingDesiredState';
|
|
2
|
+
import type { ProjectStoreListing } from './ProjectStoreListing';
|
|
3
|
+
export declare function toStoreListingDesiredState(project: ProjectStoreListing): StoreListingDesiredState;
|
|
4
|
+
//# sourceMappingURL=toStoreListingDesiredState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toStoreListingDesiredState.d.ts","sourceRoot":"","sources":["../../../src/project/storeListing/toStoreListingDesiredState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,mBAAmB,GAAG,wBAAwB,CAMjG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function toStoreListingDesiredState(project) {
|
|
2
|
+
return {
|
|
3
|
+
revision: project.revision,
|
|
4
|
+
locales: project.locales,
|
|
5
|
+
assetSets: project.assetSets.map(toCanonicalSet),
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function toCanonicalSet(set) {
|
|
9
|
+
return { ...set, assets: set.assets.map(toCanonicalAsset) };
|
|
10
|
+
}
|
|
11
|
+
function toCanonicalAsset(asset) {
|
|
12
|
+
const { sourcePath: _sourcePath, ...canonical } = asset;
|
|
13
|
+
return canonical;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=toStoreListingDesiredState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toStoreListingDesiredState.js","sourceRoot":"","sources":["../../../src/project/storeListing/toStoreListingDesiredState.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,0BAA0B,CAAC,OAA4B;IACrE,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC;KACjD,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,GAAgC;IACtD,OAAO,EAAE,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;AAC9D,CAAC;AAED,SAAS,gBAAgB,CAAC,KAA+B;IACvD,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IACxD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { StoreListingAsset } from '../../domain/storeListing/StoreListingAsset';\nimport type { StoreListingAssetSet } from '../../domain/storeListing/StoreListingAssetSet';\nimport type { StoreListingDesiredState } from '../../domain/storeListing/StoreListingDesiredState';\nimport type { ProjectStoreListing } from './ProjectStoreListing';\nimport type { ProjectStoreListingAsset } from './ProjectStoreListingAsset';\nimport type { ProjectStoreListingAssetSet } from './ProjectStoreListingAssetSet';\n\nexport function toStoreListingDesiredState(project: ProjectStoreListing): StoreListingDesiredState {\n return {\n revision: project.revision,\n locales: project.locales,\n assetSets: project.assetSets.map(toCanonicalSet),\n };\n}\n\nfunction toCanonicalSet(set: ProjectStoreListingAssetSet): StoreListingAssetSet {\n return { ...set, assets: set.assets.map(toCanonicalAsset) };\n}\n\nfunction toCanonicalAsset(asset: ProjectStoreListingAsset): StoreListingAsset {\n const { sourcePath: _sourcePath, ...canonical } = asset;\n return canonical;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppStoreConnectTransport.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreConnectTransport.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppStoreConnectTransport.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreConnectTransport.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,sBAAsB,KAC5B,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAEtC,eAAO,MAAM,oBAAoB,EAAE,wBAYlC,CAAC"}
|