Skip to content

Commit

Permalink
fix servelessPod
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-zucker committed Mar 2, 2021
1 parent 65ad5e0 commit 7c008bd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ dist
coverage
lib
test-folder
log.txt
log.txt
myPod
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solid-rest/core",
"version": "2.0.5",
"version": "2.0.6",
"author": "Jeff Zucker",
"license": "MIT",
"description": "treat any storage as a mini Solid server",
Expand Down
26 changes: 6 additions & 20 deletions core/src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,14 @@ import * as pod from './createServerlessPod.js';
const linkExt = ['.acl', '.meta'];
const linksExt = linkExt.concat('.meta.acl');


function url2Path( url ) {
}

async function createServerlessPod(base) {
console.log(`Creating pod at <${base}>`);
base = base.replace(/\/$/, '');
let baseExists = await this.perform('ITEM_EXISTS', base);

if (!baseExists) {
console.log(`Folder <${base}> does not exist.`);
process.exit();
}
/*
await _makeResource( base,"/.acl", pod.acl_content );
await _makeResource( base,"/profile/card", pod.profile_content );
await _makeResource( base,"/settings/prefs.ttl", pod.prefs_content );
await _makeResource(base,"/settings/privateTypeIndex.ttl",pod.private_content );
await _makeResource( base,"/settings/publicTypeIndex.ttl", pod.public_content );
await _makeResource( base,"/private/.meta", "" );
await _makeResource( base,"/.well-known/.meta", "" );
await _makeResource( base,"/public/.meta", "" );
await _makeResource( base,"/inbox/.meta", "" );
*/


base = base.replace(/^[^:]*:\/\//, '');
await this.perform('FULL_PUT', base + "/.acl", pod.acl_content);
await this.perform('FULL_PUT', base + "/profile/card", pod.profile_content);
await this.perform('FULL_PUT', base + "/settings/prefs.ttl", pod.prefs_content);
Expand Down Expand Up @@ -68,4 +54,4 @@ async function generateRandomSlug(pathname, slug = uuidv1()) {
return this.mungePath(pathname, slug);
}

export { createServerlessPod, getContentType, isAuxResource, getAuxResources, generateRandomSlug, linkExt, linksExt };
export { createServerlessPod, getContentType, isAuxResource, getAuxResources, generateRandomSlug, linkExt, linksExt };
4 changes: 2 additions & 2 deletions file/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solid-rest/file",
"version": "2.0.6",
"version": "2.0.7",
"author": "Jeff Zucker",
"license": "MIT",
"description": "solid-rest plugin for filesystems",
Expand Down Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/solid/solid-rest#readme",
"dependencies": {
"@solid-rest/core": "^2.0.5",
"@solid-rest/core": "^2.0.6",
"concat-stream": "^2.0.0",
"fs-extra": "^9.0.1",
"mime-types": "^2.1.27",
Expand Down

0 comments on commit 7c008bd

Please sign in to comment.