@lumy-pack/syncpoint 0.0.10 → 0.0.11
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.
- package/dist/cli.mjs +791 -339
- package/dist/commands/Link.d.ts +9 -0
- package/dist/commands/Unlink.d.ts +2 -0
- package/dist/core/link.d.ts +19 -0
- package/dist/errors.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/utils/types.d.ts +15 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface LinkViewProps {
|
|
4
|
+
refPath?: string;
|
|
5
|
+
yes: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const LinkView: React.FC<LinkViewProps>;
|
|
8
|
+
export declare function registerLinkCommand(program: Command): void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LinkOptions, LinkResult, UnlinkOptions, UnlinkResult } from '../utils/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Move ~/.syncpoint to {destination}/.syncpoint/ and create a symlink.
|
|
4
|
+
* If ~/.syncpoint is already a symlink, unlink and restore before re-linking.
|
|
5
|
+
*/
|
|
6
|
+
export declare function linkSyncpoint(destination: string, _options?: LinkOptions): Promise<LinkResult>;
|
|
7
|
+
/**
|
|
8
|
+
* Create a symlink ~/.syncpoint → <refPath>/.syncpoint.
|
|
9
|
+
* For backwards compatibility, if refPath already points to a .syncpoint directory,
|
|
10
|
+
* it is used as-is.
|
|
11
|
+
* If ~/.syncpoint already exists, the caller must handle confirmation before invoking this.
|
|
12
|
+
*/
|
|
13
|
+
export declare function linkSyncpointByRef(refPath: string): Promise<LinkResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Remove the symlink at ~/.syncpoint and restore its contents by copying
|
|
16
|
+
* from the symlink target back to ~/.syncpoint.
|
|
17
|
+
* With options.clean=true, also removes the destination copy.
|
|
18
|
+
*/
|
|
19
|
+
export declare function unlinkSyncpoint(options?: UnlinkOptions): Promise<UnlinkResult>;
|
package/dist/errors.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const SyncpointErrorCode: {
|
|
|
7
7
|
readonly PROVISION_FAILED: "PROVISION_FAILED";
|
|
8
8
|
readonly MISSING_ARGUMENT: "MISSING_ARGUMENT";
|
|
9
9
|
readonly INVALID_ARGUMENT: "INVALID_ARGUMENT";
|
|
10
|
+
readonly LINK_FAILED: "LINK_FAILED";
|
|
11
|
+
readonly UNLINK_FAILED: "UNLINK_FAILED";
|
|
10
12
|
readonly UNKNOWN: "UNKNOWN";
|
|
11
13
|
};
|
|
12
14
|
export type SyncpointErrorCode = (typeof SyncpointErrorCode)[keyof typeof SyncpointErrorCode];
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
package/dist/utils/types.d.ts
CHANGED
|
@@ -144,3 +144,18 @@ export interface InitOptions {
|
|
|
144
144
|
export interface CliOptions {
|
|
145
145
|
verbose?: boolean;
|
|
146
146
|
}
|
|
147
|
+
export interface LinkOptions {
|
|
148
|
+
}
|
|
149
|
+
export interface UnlinkOptions {
|
|
150
|
+
clean?: boolean;
|
|
151
|
+
}
|
|
152
|
+
export interface LinkResult {
|
|
153
|
+
appDir: string;
|
|
154
|
+
targetDir: string;
|
|
155
|
+
wasAlreadyLinked: boolean;
|
|
156
|
+
}
|
|
157
|
+
export interface UnlinkResult {
|
|
158
|
+
appDir: string;
|
|
159
|
+
targetDir: string;
|
|
160
|
+
cleaned: boolean;
|
|
161
|
+
}
|
package/dist/version.d.ts
CHANGED