mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: ConfigPodManager is now configured to use internal storage. Using internal path utils for determining TemplatedPodGenerator config path.
This commit is contained in:
parent
4d1bd93e94
commit
cc2c284aa0
@ -85,15 +85,6 @@
|
|||||||
"describe": "URL of the SPARQL endpoint, when using a quadstore-based configuration."
|
"describe": "URL of the SPARQL endpoint, when using a quadstore-based configuration."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"@type": "YargsParameter",
|
|
||||||
"name": "podConfigJson",
|
|
||||||
"options": {
|
|
||||||
"requiresArg": true,
|
|
||||||
"type": "string",
|
|
||||||
"describe": "Path to the file that keeps track of dynamic Pod configurations."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"@type": "YargsParameter",
|
"@type": "YargsParameter",
|
||||||
"name": "seededPodConfigJson",
|
"name": "seededPodConfigJson",
|
||||||
|
@ -51,14 +51,6 @@
|
|||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"CombinedShorthandResolver:_resolvers_key": "urn:solid-server:default:variable:podConfigJson",
|
|
||||||
"CombinedShorthandResolver:_resolvers_value": {
|
|
||||||
"@type": "AssetPathExtractor",
|
|
||||||
"key": "podConfigJson",
|
|
||||||
"defaultPath": "./pod-config.json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"CombinedShorthandResolver:_resolvers_key": "urn:solid-server:default:variable:seededPodConfigJson",
|
"CombinedShorthandResolver:_resolvers_key": "urn:solid-server:default:variable:seededPodConfigJson",
|
||||||
"CombinedShorthandResolver:_resolvers_value": {
|
"CombinedShorthandResolver:_resolvers_value": {
|
||||||
|
@ -45,9 +45,9 @@
|
|||||||
{
|
{
|
||||||
"comment": "This is where the pod configurations will be stored.",
|
"comment": "This is where the pod configurations will be stored.",
|
||||||
"@id": "urn:solid-server:default:PodConfigurationStorage",
|
"@id": "urn:solid-server:default:PodConfigurationStorage",
|
||||||
"@type": "JsonFileStorage",
|
"@type": "EncodingPathStorage",
|
||||||
"filePath": { "@id": "urn:solid-server:default:variable:podConfigJson" },
|
"relativePath": "/dynamic-pods/configs/",
|
||||||
"locker": { "@id": "urn:solid-server:default:ResourceLocker" }
|
"source": { "@id": "urn:solid-server:default:KeyValueStorage" }
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -32,11 +32,6 @@
|
|||||||
"@id": "urn:solid-server:default:variable:showStackTrace",
|
"@id": "urn:solid-server:default:variable:showStackTrace",
|
||||||
"@type": "Variable"
|
"@type": "Variable"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"comment": "Path to the JSON file used to store configuration for dynamic pods.",
|
|
||||||
"@id": "urn:solid-server:default:variable:podConfigJson",
|
|
||||||
"@type": "Variable"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"comment": "Path to the JSON file used to seed pods.",
|
"comment": "Path to the JSON file used to seed pods.",
|
||||||
"@id": "urn:solid-server:default:variable:seededPodConfigJson",
|
"@id": "urn:solid-server:default:variable:seededPodConfigJson",
|
||||||
|
@ -4,14 +4,14 @@ import type { KeyValueStorage } from '../../storage/keyvalue/KeyValueStorage';
|
|||||||
import type { ResourceStore } from '../../storage/ResourceStore';
|
import type { ResourceStore } from '../../storage/ResourceStore';
|
||||||
import { BadRequestHttpError } from '../../util/errors/BadRequestHttpError';
|
import { BadRequestHttpError } from '../../util/errors/BadRequestHttpError';
|
||||||
import { ConflictHttpError } from '../../util/errors/ConflictHttpError';
|
import { ConflictHttpError } from '../../util/errors/ConflictHttpError';
|
||||||
import { joinFilePath } from '../../util/PathUtil';
|
import { joinFilePath, modulePathPlaceholder, resolveAssetPath } from '../../util/PathUtil';
|
||||||
import type { PodSettings } from '../settings/PodSettings';
|
import type { PodSettings } from '../settings/PodSettings';
|
||||||
import type { ComponentsJsFactory } from './ComponentsJsFactory';
|
import type { ComponentsJsFactory } from './ComponentsJsFactory';
|
||||||
import type { PodGenerator } from './PodGenerator';
|
import type { PodGenerator } from './PodGenerator';
|
||||||
import type { VariableHandler } from './variables/VariableHandler';
|
import type { VariableHandler } from './variables/VariableHandler';
|
||||||
import { isValidVariable, TEMPLATE, TEMPLATE_VARIABLE } from './variables/Variables';
|
import { isValidVariable, TEMPLATE, TEMPLATE_VARIABLE } from './variables/Variables';
|
||||||
|
|
||||||
const DEFAULT_CONFIG_PATH = joinFilePath(__dirname, '../../../templates/config/');
|
const DEFAULT_CONFIG_PATH = resolveAssetPath(`${modulePathPlaceholder}/templates/config/`);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new ResourceStore when creating a pod based on a Components.js configuration.
|
* Creates a new ResourceStore when creating a pod based on a Components.js configuration.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user