wirejs-deploy-amplify-basic 0.1.167 → 0.1.168

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.
@@ -101,6 +101,7 @@ function extractSetCookies(context: Context) {
101
101
  if (cookie.maxAge) cookieOptions.push(`Max-Age=${cookie.maxAge}`);
102
102
  if (cookie.httpOnly) cookieOptions.push('HttpOnly');
103
103
  if (cookie.secure) cookieOptions.push('Secure');
104
+ if (cookie.path) cookieOptions.push(`Path=${cookie.path}`);
104
105
  cookies.push(`${cookie.name}=${cookie.value}; ${cookieOptions.join('; ')}`);
105
106
  }
106
107
  return cookies;
@@ -182,6 +182,7 @@ for (const resource of generated) {
182
182
  removalPolicy: RemovalPolicy.RETAIN,
183
183
  billingMode: BillingMode.PAY_PER_REQUEST,
184
184
  pointInTimeRecovery: true,
185
+ timeToLiveAttribute: resource.options.ttlAttribute,
185
186
  });
186
187
 
187
188
  new TableIndexes(tableStack, `${tableName}Indexes`,
@@ -3,6 +3,6 @@
3
3
  "dependencies": {
4
4
  "jsdom": "^25.0.1",
5
5
  "wirejs-dom": "^1.0.44",
6
- "wirejs-resources": "^0.1.167"
6
+ "wirejs-resources": "^0.1.168"
7
7
  }
8
8
  }
@@ -22,6 +22,7 @@ export declare class DistributedTable<const P extends Parser<any>, const T exten
22
22
  parse: P;
23
23
  key: Key;
24
24
  indexes?: Indexes;
25
+ ttlAttribute?: string;
25
26
  });
26
27
  get partitionKeyName(): Key['partition']['field'];
27
28
  get sortKeyName(): 'field' extends keyof Key['sort'] ? (Key['sort']['field'] extends string ? Key['sort']['field'] : undefined) : undefined;
@@ -134,7 +134,8 @@ export class DistributedTable extends Resource {
134
134
  absoluteId: this.absoluteId,
135
135
  partitionKey: this.key.partition,
136
136
  sortKey: this.key.sort,
137
- indexes: this.indexes
137
+ indexes: this.indexes,
138
+ ttlAttribute: options.ttlAttribute,
138
139
  };
139
140
  addResource('DistributedTable', resourceDefinition);
140
141
  }
@@ -132,10 +132,10 @@ export class AuthenticationService extends AuthenticationServiceBase {
132
132
  if (state?.state === 'authenticated') {
133
133
  if (this.#keepalive)
134
134
  await this.#cookie.write(cookies, state);
135
- return {
136
- ...state,
137
- actions: machineActions('changepassword', 'signout')
138
- };
135
+ const actions = state.user.oidcProvider
136
+ ? machineActions('signout')
137
+ : machineActions('changepassword', 'signout');
138
+ return { ...state, actions };
139
139
  }
140
140
  else {
141
141
  if (state?.substate === 'pending-completesignup') {
@@ -160,10 +160,14 @@ export class AuthenticationService extends AuthenticationServiceBase {
160
160
  };
161
161
  }
162
162
  else {
163
+ const oidcActions = await this.getOidcMachineActions();
163
164
  return {
164
165
  state: 'unauthenticated',
165
166
  user: undefined,
166
- actions: machineActions('signin', 'startsignup', 'startforgotpassword')
167
+ actions: {
168
+ ...machineActions('signin', 'startsignup', 'startforgotpassword'),
169
+ ...oidcActions,
170
+ }
167
171
  };
168
172
  }
169
173
  }
@@ -364,6 +368,9 @@ export class AuthenticationService extends AuthenticationServiceBase {
364
368
  this.#cookie.clear(cookies);
365
369
  return this.getMachineState(cookies);
366
370
  }
371
+ if (state.user.oidcProvider) {
372
+ return { errors: [{ message: 'Password change is not available for social sign-in accounts.' }] };
373
+ }
367
374
  try {
368
375
  // change password requires an access token, which we don't actually store.
369
376
  // so, first step is to actually authenticate.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wirejs-deploy-amplify-basic",
3
- "version": "0.1.167",
3
+ "version": "0.1.168",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "recursive-copy": "^2.0.14",
45
45
  "rimraf": "^6.0.1",
46
46
  "wirejs-dom": "^1.0.44",
47
- "wirejs-resources": "^0.1.167"
47
+ "wirejs-resources": "^0.1.168"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@aws-amplify/backend": "^1.14.0",