mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 21:12:56 +03:00
npm/api: correct metadata resource interface
Fixes urbit/landscape#1035 Fixes urbit/landscape#1024
This commit is contained in:
parent
9980a60f7d
commit
2412564aa7
3946
package-lock.json
generated
3946
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
extends: '@urbit/eslint-config',
|
||||
extends: '@urbit',
|
||||
env: {
|
||||
'jest': true
|
||||
}
|
||||
|
50616
pkg/interface/package-lock.json
generated
50616
pkg/interface/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
||||
module.exports = {
|
||||
extends: "@urbit"
|
||||
};
|
||||
extends: '@urbit'
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AppName, Path, Poke, uxToHex, PatpNoSig } from "../lib";
|
||||
import { AppName, Path, Poke, uxToHex, PatpNoSig } from '../lib';
|
||||
import { Association, Metadata, MetadataUpdate, MetadataUpdateAdd, MetadataUpdateRemove } from './types';
|
||||
|
||||
export const METADATA_UPDATE_VERSION = 1;
|
||||
@ -18,13 +18,13 @@ export const add = (
|
||||
description: string,
|
||||
dateCreated: string,
|
||||
color: string,
|
||||
moduleName: string,
|
||||
moduleName: string
|
||||
): Poke<MetadataUpdateAdd> => metadataAction({
|
||||
add: {
|
||||
group,
|
||||
resource: {
|
||||
resource,
|
||||
app: appName
|
||||
'app-name': appName
|
||||
},
|
||||
metadata: {
|
||||
title,
|
||||
@ -52,7 +52,7 @@ export const remove = (
|
||||
group,
|
||||
resource: {
|
||||
resource,
|
||||
app: appName
|
||||
'app-name': appName
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -70,11 +70,11 @@ export const update = (
|
||||
group: association.group,
|
||||
resource: {
|
||||
resource: association.resource,
|
||||
app: association.app
|
||||
'app-name': association['app-name']
|
||||
},
|
||||
metadata
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export { update as metadataUpdate };
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AppName, Path, Patp } from "../lib";
|
||||
import { AppName, Path, Patp } from '../lib';
|
||||
|
||||
export type MetadataUpdate =
|
||||
MetadataUpdateInitial
|
||||
@ -31,13 +31,13 @@ export type MetadataUpdateRemove = {
|
||||
|
||||
export interface MdResource {
|
||||
resource: string;
|
||||
app: AppName;
|
||||
'app-name': AppName;
|
||||
}
|
||||
|
||||
export interface MetadataUpdatePreview {
|
||||
group: string;
|
||||
channels: Associations;
|
||||
"channel-count": number;
|
||||
'channel-count': number;
|
||||
members: number;
|
||||
metadata: Metadata;
|
||||
}
|
||||
|
1623
pkg/npm/api/package-lock.json
generated
1623
pkg/npm/api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^15.12.5",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.2",
|
||||
"@typescript-eslint/parser": "^4.28.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint-plugin-react": "^7.24.0",
|
||||
"onchange": "^7.1.0",
|
||||
"typescript": "^4.3.2"
|
||||
}
|
||||
|
3706
pkg/npm/eslint-config/package-lock.json
generated
3706
pkg/npm/eslint-config/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12110
pkg/npm/http-api/package-lock.json
generated
12110
pkg/npm/http-api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user