@webiny/api-file-manager 6.6.0-alpha.3 → 6.6.0-alpha.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/settings/SettingsInstaller/SettingsInstaller.js","sources":["../../../../src/features/settings/SettingsInstaller/SettingsInstaller.ts"],"sourcesContent":["import { ServiceDiscovery } from \"@webiny/api-core/features/serviceDiscovery/index.js\";\nimport { createImplementation } from \"@webiny/feature/api\";\nimport { AppInstaller } from \"@webiny/api-core/features/tenancy/InstallTenant/index.js\";\nimport { FILE_MANAGER_GENERAL_SETTINGS } from \"~/domain/settings/constants.js\";\nimport { UpdateSettingsUseCase } from \"~/features/settings/UpdateSettings/abstractions.js\";\nimport { KeyValueStore } from \"@webiny/api-core/features/keyValueStore/index.js\";\nimport { BuildParams } from \"@webiny/api-core/features/buildParams/index.js\";\n\nclass SettingsInstallerImpl implements AppInstaller.Interface {\n readonly alwaysRun = true;\n readonly appName = \"FileManager\";\n readonly dependsOn = [];\n\n constructor(\n private updateSettings: UpdateSettingsUseCase.Interface,\n private keyValueStore: KeyValueStore.Interface,\n private buildParams: BuildParams.Interface\n ) {}\n\n async install(): Promise<void> {\n // TODO: move this to api-core with a proper abstraction\n const manifest = await ServiceDiscovery.load();\n\n // If no records in the database, `manifest` object is empty POJO.\n // That's why the heavy `?.` usage.\n //\n // The AWS hosting type serves files from a CloudFront domain (in the manifest). The
|
|
1
|
+
{"version":3,"file":"features/settings/SettingsInstaller/SettingsInstaller.js","sources":["../../../../src/features/settings/SettingsInstaller/SettingsInstaller.ts"],"sourcesContent":["import { ServiceDiscovery } from \"@webiny/api-core/features/serviceDiscovery/index.js\";\nimport { createImplementation } from \"@webiny/feature/api\";\nimport { AppInstaller } from \"@webiny/api-core/features/tenancy/InstallTenant/index.js\";\nimport { FILE_MANAGER_GENERAL_SETTINGS } from \"~/domain/settings/constants.js\";\nimport { UpdateSettingsUseCase } from \"~/features/settings/UpdateSettings/abstractions.js\";\nimport { KeyValueStore } from \"@webiny/api-core/features/keyValueStore/index.js\";\nimport { BuildParams } from \"@webiny/api-core/features/buildParams/index.js\";\n\nclass SettingsInstallerImpl implements AppInstaller.Interface {\n readonly alwaysRun = true;\n readonly appName = \"FileManager\";\n readonly dependsOn = [];\n\n constructor(\n private updateSettings: UpdateSettingsUseCase.Interface,\n private keyValueStore: KeyValueStore.Interface,\n private buildParams: BuildParams.Interface\n ) {}\n\n async install(): Promise<void> {\n // TODO: move this to api-core with a proper abstraction\n const manifest = await ServiceDiscovery.load();\n\n // If no records in the database, `manifest` object is empty POJO.\n // That's why the heavy `?.` usage.\n //\n // The AWS hosting type serves files from a CloudFront domain (in the manifest). The standalone\n // (server) hosting type has no CloudFront — files are served by the api's own `/files/*` route — so\n // fall back to the configured API origin, read from the WEBINY_API_URL build param (baked by\n // Infra.ApiUrl), not a process.env read.\n const domain =\n manifest?.api?.cloudfront?.domain ??\n this.buildParams.get<string>(\"WEBINY_API_URL\") ??\n \"\";\n\n await this.updateSettings.execute({\n srcPrefix: `${domain}/files`\n });\n }\n\n async uninstall(): Promise<void> {\n await this.keyValueStore.delete(FILE_MANAGER_GENERAL_SETTINGS);\n }\n}\n\nexport const SettingsInstaller = createImplementation({\n abstraction: AppInstaller,\n implementation: SettingsInstallerImpl,\n dependencies: [UpdateSettingsUseCase, KeyValueStore, BuildParams]\n});\n"],"names":["SettingsInstallerImpl","updateSettings","keyValueStore","buildParams","manifest","ServiceDiscovery","domain","FILE_MANAGER_GENERAL_SETTINGS","SettingsInstaller","createImplementation","AppInstaller","UpdateSettingsUseCase","KeyValueStore","BuildParams"],"mappings":";;;;;;;AAQA,MAAMA;IAKF,YACYC,cAA+C,EAC/CC,aAAsC,EACtCC,WAAkC,CAC5C;aAHUF,cAAc,GAAdA;aACAC,aAAa,GAAbA;aACAC,WAAW,GAAXA;aAPH,SAAS,GAAG;aACZ,OAAO,GAAG;aACV,SAAS,GAAG,EAAE;IAMpB;IAEH,MAAM,UAAyB;QAE3B,MAAMC,WAAW,MAAMC,iBAAiB,IAAI;QAS5C,MAAMC,SACFF,UAAU,KAAK,YAAY,UAC3B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAS,qBAC7B;QAEJ,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YAC9B,WAAW,GAAGE,OAAO,MAAM,CAAC;QAChC;IACJ;IAEA,MAAM,YAA2B;QAC7B,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAACC;IACpC;AACJ;AAEO,MAAMC,oBAAoBC,qBAAqB;IAClD,aAAaC;IACb,gBAAgBV;IAChB,cAAc;QAACW;QAAuBC;QAAeC;KAAY;AACrE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-file-manager",
|
|
3
|
-
"version": "6.6.0-alpha.
|
|
3
|
+
"version": "6.6.0-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
],
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@webiny/api": "6.6.0-alpha.
|
|
26
|
-
"@webiny/api-core": "6.6.0-alpha.
|
|
27
|
-
"@webiny/api-graphql": "6.6.0-alpha.
|
|
28
|
-
"@webiny/api-headless-cms": "6.6.0-alpha.
|
|
29
|
-
"@webiny/background-tasks": "6.6.0-alpha.
|
|
30
|
-
"@webiny/build-tools": "6.6.0-alpha.
|
|
25
|
+
"@webiny/api": "6.6.0-alpha.4",
|
|
26
|
+
"@webiny/api-core": "6.6.0-alpha.4",
|
|
27
|
+
"@webiny/api-graphql": "6.6.0-alpha.4",
|
|
28
|
+
"@webiny/api-headless-cms": "6.6.0-alpha.4",
|
|
29
|
+
"@webiny/background-tasks": "6.6.0-alpha.4",
|
|
30
|
+
"@webiny/build-tools": "6.6.0-alpha.4",
|
|
31
31
|
"@webiny/di": "1.1.0",
|
|
32
|
-
"@webiny/error": "6.6.0-alpha.
|
|
33
|
-
"@webiny/event-handler-core": "6.6.0-alpha.
|
|
34
|
-
"@webiny/feature": "6.6.0-alpha.
|
|
35
|
-
"@webiny/handler": "6.6.0-alpha.
|
|
36
|
-
"@webiny/plugins": "6.6.0-alpha.
|
|
37
|
-
"@webiny/wcp": "6.6.0-alpha.
|
|
32
|
+
"@webiny/error": "6.6.0-alpha.4",
|
|
33
|
+
"@webiny/event-handler-core": "6.6.0-alpha.4",
|
|
34
|
+
"@webiny/feature": "6.6.0-alpha.4",
|
|
35
|
+
"@webiny/handler": "6.6.0-alpha.4",
|
|
36
|
+
"@webiny/plugins": "6.6.0-alpha.4",
|
|
37
|
+
"@webiny/wcp": "6.6.0-alpha.4",
|
|
38
38
|
"cache-control-parser": "2.2.0",
|
|
39
39
|
"graphql": "16.14.2",
|
|
40
40
|
"mime": "4.1.0",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/object-hash": "3.0.6",
|
|
48
|
-
"@webiny/api-core-testing": "6.6.0-alpha.
|
|
49
|
-
"@webiny/utils": "6.6.0-alpha.
|
|
50
|
-
"@webiny/wcp": "6.6.0-alpha.
|
|
48
|
+
"@webiny/api-core-testing": "6.6.0-alpha.4",
|
|
49
|
+
"@webiny/utils": "6.6.0-alpha.4",
|
|
50
|
+
"@webiny/wcp": "6.6.0-alpha.4",
|
|
51
51
|
"rimraf": "6.1.3",
|
|
52
52
|
"typescript": "7.0.2"
|
|
53
53
|
},
|