@slicemachine/manager 0.22.4-alpha.BI-dt-2482-set-default-master-language-when-creating-new-repo-via-cli.2 → 0.22.4-alpha.BI-dt-2481-set-master-language-for-a-repository-via-manager-package.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ const API_ENDPOINTS = (() => {
|
|
15
15
|
PrismicUnsplash: trailingSlash.addTrailingSlash(process.env.unsplash_endpoint ?? "https://unsplash.wroom.io/"),
|
16
16
|
SliceMachineV1: trailingSlash.addTrailingSlash(process.env.slice_machine_v1_endpoint ?? "https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/"),
|
17
17
|
RepositoryService: trailingSlash.addTrailingSlash(process.env.repository_api ?? "https://repository.internal.wroom.io/"),
|
18
|
-
LocaleService: trailingSlash.addTrailingSlash("https://locale.internal.wroom.io/")
|
18
|
+
LocaleService: trailingSlash.addTrailingSlash(process.env.locale_api ?? "https://locale.internal.wroom.io/")
|
19
19
|
};
|
20
20
|
const missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {
|
21
21
|
return !apiEndpoints[key];
|
@@ -64,7 +64,7 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
64
64
|
PrismicUnsplash: "https://unsplash.prismic.io/",
|
65
65
|
SliceMachineV1: "https://sm-api.prismic.io/v1/",
|
66
66
|
RepositoryService: "https://repository.prismic.io/",
|
67
|
-
LocaleService: "https://locale.prismic.io/"
|
67
|
+
LocaleService: "https://locale.internal.prismic.io/"
|
68
68
|
};
|
69
69
|
}
|
70
70
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"API_ENDPOINTS.cjs","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ?? \"https://repository.internal.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\"https://locale.internal.wroom.io/\"),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://2iamcvnxf4.execute-api.us-east-1.amazonaws.com/stage/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1:\n\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\tRepositoryService: \"https://repository.internal.wroom.io/\",\n\t\t\t\tLocaleService: \"https://locale.internal.wroom.io/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://0yyeb2g040.execute-api.us-east-1.amazonaws.com/prod/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \"https://repository.prismic.io/\",\n\t\t\t\tLocaleService: \"https://locale.prismic.io/\",\n\t\t\t};\n\t\t}\n\t}\n})();\n"],"names":["APPLICATION_MODE","addTrailingSlash","removeTrailingSlash"],"mappings":";;;;AAgBO,MAAM,iBAA+B,MAAK;AACxC,UAAA,QAAQ,IAAI,QAAQ;AAAA,IAC3B,KAAKA,iBAAAA,iBAAiB,aAAa;AAClC,YAAM,eAAe;AAAA,QACpB,cAAcC,cAAA,iBAAiB,QAAQ,IAAI,cAAc;AAAA,QACzD,uBAAuBA,cAAA,iBACtB,QAAQ,IAAI,8BAA8B;AAAA,QAE3C,eAAeA,cAAA,iBAAiB,QAAQ,IAAI,uBAAuB;AAAA,QACnE,aAAaA,cAAA,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAC/D,gBAAgBA,cAAA,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAClE,cAAcC,cAAAA,oBACb,QAAQ,IAAI,mBAAmB,yBAAyB;AAAA,QAEzD,iBAAiBD,cAAAA,iBAChB,QAAQ,IAAI,qBAAqB,4BAA4B;AAAA,QAE9D,gBAAgBA,cAAAA,iBACf,QAAQ,IAAI,6BACX,4DAA4D;AAAA,QAE9D,mBAAmBA,cAAAA,iBAClB,QAAQ,IAAI,kBAAkB,uCAAuC;AAAA,QAEtE,eAAeA
|
1
|
+
{"version":3,"file":"API_ENDPOINTS.cjs","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ?? \"https://repository.internal.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\n\t\t\t\t\tprocess.env.locale_api ?? \"https://locale.internal.wroom.io/\",\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://2iamcvnxf4.execute-api.us-east-1.amazonaws.com/stage/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1:\n\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\tRepositoryService: \"https://repository.internal.wroom.io/\",\n\t\t\t\tLocaleService: \"https://locale.internal.wroom.io/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://0yyeb2g040.execute-api.us-east-1.amazonaws.com/prod/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \"https://repository.prismic.io/\",\n\t\t\t\tLocaleService: \"https://locale.internal.prismic.io/\",\n\t\t\t};\n\t\t}\n\t}\n})();\n"],"names":["APPLICATION_MODE","addTrailingSlash","removeTrailingSlash"],"mappings":";;;;AAgBO,MAAM,iBAA+B,MAAK;AACxC,UAAA,QAAQ,IAAI,QAAQ;AAAA,IAC3B,KAAKA,iBAAAA,iBAAiB,aAAa;AAClC,YAAM,eAAe;AAAA,QACpB,cAAcC,cAAA,iBAAiB,QAAQ,IAAI,cAAc;AAAA,QACzD,uBAAuBA,cAAA,iBACtB,QAAQ,IAAI,8BAA8B;AAAA,QAE3C,eAAeA,cAAA,iBAAiB,QAAQ,IAAI,uBAAuB;AAAA,QACnE,aAAaA,cAAA,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAC/D,gBAAgBA,cAAA,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAClE,cAAcC,cAAAA,oBACb,QAAQ,IAAI,mBAAmB,yBAAyB;AAAA,QAEzD,iBAAiBD,cAAAA,iBAChB,QAAQ,IAAI,qBAAqB,4BAA4B;AAAA,QAE9D,gBAAgBA,cAAAA,iBACf,QAAQ,IAAI,6BACX,4DAA4D;AAAA,QAE9D,mBAAmBA,cAAAA,iBAClB,QAAQ,IAAI,kBAAkB,uCAAuC;AAAA,QAEtE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.wroom.io/"),
|
14
14
|
SliceMachineV1: addTrailingSlash(process.env.slice_machine_v1_endpoint ?? "https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/"),
|
15
15
|
RepositoryService: addTrailingSlash(process.env.repository_api ?? "https://repository.internal.wroom.io/"),
|
16
|
-
LocaleService: addTrailingSlash("https://locale.internal.wroom.io/")
|
16
|
+
LocaleService: addTrailingSlash(process.env.locale_api ?? "https://locale.internal.wroom.io/")
|
17
17
|
};
|
18
18
|
const missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {
|
19
19
|
return !apiEndpoints[key];
|
@@ -62,7 +62,7 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
62
62
|
PrismicUnsplash: "https://unsplash.prismic.io/",
|
63
63
|
SliceMachineV1: "https://sm-api.prismic.io/v1/",
|
64
64
|
RepositoryService: "https://repository.prismic.io/",
|
65
|
-
LocaleService: "https://locale.prismic.io/"
|
65
|
+
LocaleService: "https://locale.internal.prismic.io/"
|
66
66
|
};
|
67
67
|
}
|
68
68
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"API_ENDPOINTS.js","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ?? \"https://repository.internal.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\"https://locale.internal.wroom.io/\"),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://2iamcvnxf4.execute-api.us-east-1.amazonaws.com/stage/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1:\n\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\tRepositoryService: \"https://repository.internal.wroom.io/\",\n\t\t\t\tLocaleService: \"https://locale.internal.wroom.io/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://0yyeb2g040.execute-api.us-east-1.amazonaws.com/prod/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \"https://repository.prismic.io/\",\n\t\t\t\tLocaleService: \"https://locale.prismic.io/\",\n\t\t\t};\n\t\t}\n\t}\n})();\n"],"names":[],"mappings":";;AAgBO,MAAM,iBAA+B,MAAK;AACxC,UAAA,QAAQ,IAAI,QAAQ;AAAA,IAC3B,KAAK,iBAAiB,aAAa;AAClC,YAAM,eAAe;AAAA,QACpB,cAAc,iBAAiB,QAAQ,IAAI,cAAc;AAAA,QACzD,uBAAuB,iBACtB,QAAQ,IAAI,8BAA8B;AAAA,QAE3C,eAAe,iBAAiB,QAAQ,IAAI,uBAAuB;AAAA,QACnE,aAAa,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAC/D,gBAAgB,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAClE,cAAc,oBACb,QAAQ,IAAI,mBAAmB,yBAAyB;AAAA,QAEzD,iBAAiB,iBAChB,QAAQ,IAAI,qBAAqB,4BAA4B;AAAA,QAE9D,gBAAgB,iBACf,QAAQ,IAAI,6BACX,4DAA4D;AAAA,QAE9D,mBAAmB,iBAClB,QAAQ,IAAI,kBAAkB,uCAAuC;AAAA,QAEtE,eAAe,
|
1
|
+
{"version":3,"file":"API_ENDPOINTS.js","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ?? \"https://repository.internal.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\n\t\t\t\t\tprocess.env.locale_api ?? \"https://locale.internal.wroom.io/\",\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://2iamcvnxf4.execute-api.us-east-1.amazonaws.com/stage/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1:\n\t\t\t\t\t\"https://mc5qopc07a.execute-api.us-east-1.amazonaws.com/v1/\",\n\t\t\t\tRepositoryService: \"https://repository.internal.wroom.io/\",\n\t\t\t\tLocaleService: \"https://locale.internal.wroom.io/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider:\n\t\t\t\t\t\"https://0yyeb2g040.execute-api.us-east-1.amazonaws.com/prod/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \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G,aAAA;AAAA,IACR;AAAA,IAEA,KAAK,iBAAiB,SAAS;AACvB,aAAA;AAAA,QACN,cAAc;AAAA,QACd,uBAAuB;AAAA,QACvB,eAAe;AAAA,QACf,aAAa;AAAA,QACb,gBACC;AAAA,QACD,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,gBACC;AAAA,QACD,mBAAmB;AAAA,QACnB,eAAe;AAAA,MAAA;AAAA,IAEjB;AAAA,IAEA,KAAK,iBAAiB;AAAA,IACtB,SAAS;AACD,aAAA;AAAA,QACN,cAAc;AAAA,QACd,uBAAuB;AAAA,QACvB,eAAe;AAAA,QACf,aAAa;AAAA,QACb,gBACC;AAAA,QACD,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,gBAAgB;AAAA,QAChB,mBAAmB;AAAA,QACnB,eAAe;AAAA,MAAA;AAAA,IAEjB;AAAA,EACD;AACD;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@slicemachine/manager",
|
3
|
-
"version": "0.22.4-alpha.BI-dt-
|
3
|
+
"version": "0.22.4-alpha.BI-dt-2481-set-master-language-for-a-repository-via-manager-package.6",
|
4
4
|
"description": "Manage all aspects of a Slice Machine project.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"@prismicio/mocks": "^2.4.0",
|
71
71
|
"@prismicio/types-internal": "^2.8.0",
|
72
72
|
"@segment/analytics-node": "^2.1.2",
|
73
|
-
"@slicemachine/plugin-kit": "0.4.58-alpha.BI-dt-
|
73
|
+
"@slicemachine/plugin-kit": "0.4.58-alpha.BI-dt-2481-set-master-language-for-a-repository-via-manager-package.6",
|
74
74
|
"cookie": "^1.0.1",
|
75
75
|
"cors": "^2.8.5",
|
76
76
|
"execa": "^7.1.1",
|
@@ -38,7 +38,9 @@ export const API_ENDPOINTS: APIEndpoints = (() => {
|
|
38
38
|
RepositoryService: addTrailingSlash(
|
39
39
|
process.env.repository_api ?? "https://repository.internal.wroom.io/",
|
40
40
|
),
|
41
|
-
LocaleService: addTrailingSlash(
|
41
|
+
LocaleService: addTrailingSlash(
|
42
|
+
process.env.locale_api ?? "https://locale.internal.wroom.io/",
|
43
|
+
),
|
42
44
|
};
|
43
45
|
|
44
46
|
const missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {
|
@@ -105,7 +107,7 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
105
107
|
PrismicUnsplash: "https://unsplash.prismic.io/",
|
106
108
|
SliceMachineV1: "https://sm-api.prismic.io/v1/",
|
107
109
|
RepositoryService: "https://repository.prismic.io/",
|
108
|
-
LocaleService: "https://locale.prismic.io/",
|
110
|
+
LocaleService: "https://locale.internal.prismic.io/",
|
109
111
|
};
|
110
112
|
}
|
111
113
|
}
|